{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled]
Gets or sets the enabled state of a form; also known as "grayed\-out".{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getDataSource]\()
Get the used datasource.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getName]\()
Get the name of this form.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getSelectedIndex]\()
Gets the current record index of the current foundset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setSelectedIndex]\(index)
Sets the current record index of the current foundset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\()
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#showRecords]\(foundset)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=enabled|class=node}{tr:id=name}{td}h6.enabled{td}{tr}{tr:id=des}{td}{sub-section:enabled_des|trigger=button|text=}{sub-section}{sub-section:enabled_des|trigger=none|class=sIndent}Gets or sets the enabled state of a form; also known as "grayed\-out".

Notes:
\-A disabled element(s) cannot be selected by clicking the form.
\-The disabled "grayed" color is dependent on the LAF set in the Servoy Smart Client Application Preferences.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:enabled_snc|trigger=button|text=}{sub-section}{sub-section:enabled_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:enabled_prs|trigger=button|text=}{sub-section}{sub-section:enabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:enabled_ret|trigger=button|text=}{sub-section}{sub-section:enabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:enabled_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:enabled_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:enabled_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_sam|trigger=none}{code:language=javascript}
//gets the enabled state of the form
var state = forms.customer.controller.enabled;
//enables the form for input
forms.customer.controller.enabled = true;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDataSource|class=node}{tr:id=name}{td}h6.getDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSource{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSource_des|trigger=button|text=}{sub-section}{sub-section:getDataSource_des|trigger=none|class=sIndent}Get the used datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSource_snc|trigger=button|text=}{sub-section}{sub-section:getDataSource_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSource_prs|trigger=button|text=}{sub-section}{sub-section:getDataSource_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSource_ret|trigger=button|text=}{sub-section}{sub-section:getDataSource_ret|trigger=none|class=sIndent}[String] -- the datasource{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSource_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSource_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSource_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_sam|trigger=none}{code:language=javascript}
var dataSource = forms.customer.controller.getDataSource();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getName|class=node}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getName_des|trigger=button|text=}{sub-section}{sub-section:getName_des|trigger=none|class=sIndent}Get the name of this form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getName_snc|trigger=button|text=}{sub-section}{sub-section:getName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getName_prs|trigger=button|text=}{sub-section}{sub-section:getName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getName_ret|trigger=button|text=}{sub-section}{sub-section:getName_ret|trigger=none|class=sIndent}[String] -- the name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_sam|trigger=none}{code:language=javascript}
var formName = forms.customer.controller.getName();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSelectedIndex|class=node}{tr:id=name}{td}h6.getSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getSelectedIndex_des|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_des|trigger=none|class=sIndent}Gets the current record index of the current foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSelectedIndex_snc|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSelectedIndex_prs|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSelectedIndex_ret|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_ret|trigger=none|class=sIndent}[Number] -- the index{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSelectedIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSelectedIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSelectedIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_sam|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setSelectedIndex|class=node}{tr:id=name}{td}h6.setSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setSelectedIndex{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:setSelectedIndex_des|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex_des|trigger=none|class=sIndent}Sets the current record index of the current foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setSelectedIndex_snc|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setSelectedIndex_prs|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex_prs|trigger=none|class=sIndent}\{[Number]} index -- the index to select
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setSelectedIndex_ret|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setSelectedIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setSelectedIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setSelectedIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex_sam|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:show_des|trigger=button|text=}{sub-section}{sub-section:show_des|trigger=none|class=sIndent}Shows the form (makes the form visible)
This function does not affect the form foundset in any way.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:show_snc|trigger=button|text=}{sub-section}{sub-section:show_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:show_prs|trigger=button|text=}{sub-section}{sub-section:show_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:show_ret|trigger=button|text=}{sub-section}{sub-section:show_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_sam|trigger=none}{code:language=javascript}
// show the form in the current window/dialog
forms.customer.controller.show();
// show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.show(w);
// show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.show(w);
// or forms.customer.controller.show("mydialog");
//show the form in the main window
//forms.customer.controller.show(null);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.showRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}showRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:showRecords-JSFoundSet_des|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_des|trigger=none|class=sIndent}Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showRecords-JSFoundSet_snc|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showRecords-JSFoundSet_prs|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- the foundset to load before showing the form.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showRecords-JSFoundSet_ret|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showRecords-JSFoundSet_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showRecords-JSFoundSet_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showRecords-JSFoundSet_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
forms.customer.controller.showRecords(foundset);
// load foundset & show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.showRecords(foundset, w);
// load foundset & show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.showRecords(foundset, w);
//forms.customer.controller.showRecords(foundset, "mydialog");
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}