Child pages
  • controller

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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 sSummerysSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property SummerySummary{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}{tbody}{tr}{td}[Boolean]{td}{td}[#readOnly]
Gets or sets the read\-only state of a form; also known as "editable"

Note: The field(s) in a form set as read\-only can be selected and the field data can be copied to clipboard.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#view]
Get/Set the current type of view of this form.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummerysSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method SummerySummary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteAllRecords]\()
Deletes all records in foundset, resulting in empty foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteRecord]\()
Delete current selected record, deletes mulitple selected records incase the foundset is using multiselect.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#duplicateRecord]\(\[location\])
Duplicate current record or record at index in the form foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#find]\()
Start a find request, use the "search" function to perform/exit the findSet the foundset in find mode.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#focusField]\(fieldName, skipReadonly)
Sets focus to a field specified by its name.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#focusFirstField]\()
Sets focus to the first field of the form; based on tab order sequence.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getContainerName]\()
Get the name of the window/dialog this form is displayed in.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getDataProviderMaxLength]\(name)
Returns the maximum length allowed in the specified dataprovider.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getDataProviderValue]\(dataProvider)
Gets a value based on the specified dataprovider name.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDataSource]\()
Get the used datasource.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#getDesignMode]\()
Returns the state of this form designmode.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getFormContext]\()
Gets the forms context where it resides, returns a dataset of its structure to the main controller.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getFormWidth]\()
Gets the form width in pixels.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getMaxRecordIndex]\()
Returns the current cached record count of the current foundset.{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}[#getPartHeight]\(partType)
Gets the part height in pixels.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getPartYOffset]\(partType)
Returns the Y offset of a given part of the 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}[String]\[]{td}{td}[#getTabSequence]\()
Get an array with the names of the components that are part of the tab sequence.{td}{tr}{tbody}{tbody}{tr}{td}[JSWindow]{td}{td}[#getWindow]\()
Returns the JSWindow that the form is shown in, or null if the form is not currently showing in a window.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#invertRecords]\()
Inverts the current foundset against all rows of the current table; all records that are not in the foundset will become the current foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadAllRecords]\()
Loads all accessible records from the datasource into the form foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadOmittedRecords]\()
Loads the records that are currently omitted in the form foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadRecords]\(\[data\], \[queryArgumentsArray\])
Load records via a (related) foundset, primary key (dataset/number/uuid) or query into the form.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#newRecord]\(\[location\])
Create a new record in the form foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#omitRecord]\()
Omit current record in form foundset, to be shown with loadOmittedRecords.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#print]\(\[printCurrentRecordOnly\], \[showPrinterSelectDialog\], \[printerJob\])
Print this form with current foundset, without preview.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#printXML]\(\[printCurrentRecordOnly\])
Print this form with current foundset records to xml format.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#recreateUI]\()
Recreates the forms UI components, to reflect the latest solution model.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#relookup]\()
Performs a relookup for the current foundset record dataproviders.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#search]\(\[clearLastResults\], \[reduceSearch\])
Start the database search and use the results, returns the number of records, make sure you did "find" function first.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDataProviderValue]\(dataprovider, value)
Sets the value based on a specified dataprovider name.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDesignMode]\(\[ondrag\], \[ondrop\], \[onselect\], \[onresize\]designMode)
Sets this form in designmode with param true, orfalse one will return to normal browse/edit mode.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDesignMode]\(ondrag, ondrop, onselect, onresize)
Sets this form in designmode with one or more callback methods.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setPageFormat]\(width, height, leftmargin, rightmargin, topmargin, bottommargin, \[orientation\], \[units\])
Set the page format to use when printing.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setPreferredPrinter]\(printerName)
Set the preferred printer name to use when printing.{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}[#setTabSequence]\(arrayOfElements)
Set the tab order sequence programatically, by passing the elements references in a javascript array.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\(\[dialogName/windowNamewindow\], \[modal\])
Shows the form (makes the form visible), optionally shownshowing it in the specified dialog (modal or not)/windowJSWindow.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#showPrintPreview]\(\[printCurrentRecordOnly\], \[printerJob\], \[zoomFactor\])
Show this form in print preview.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#showRecords]\(data, \[dialogName/windowNamewindow\], \[modal\])
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sort]\(sortString, \[defer\])
Sorts the form foundset based on the given sort string.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sortDialog]\(\[sortString\])
Show the sort dialog to the user a preselection sortString can be passed, to sort the form foundset.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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}{tbody:id=readOnly|class=node}{tr:id=name}{td}h6.readOnly{td}{tr}{tr:id=des}{td}{sub-section:readOnly_des|text=|trigger=button}{sub-section}{sub-section:readOnly_des|trigger=none|class=sIndent}Gets or sets the read\-only state of a form; also known as "editable"

Note: The field(s) in a form set as read\-only can be selected and the field data can be copied to clipboard.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:readOnly_snc|text=|trigger=button}{sub-section}{sub-section:readOnly_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:readOnly_prs|text=|trigger=button}{sub-section}{sub-section:readOnly_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:readOnly_ret|text=|trigger=button}{sub-section}{sub-section:readOnly_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:readOnly_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:readOnly_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:readOnly_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:readOnly_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:readOnly_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:readOnly_sam|trigger=none}{code:language=javascript}
//gets the read-only state of the form
var state = forms.customer.controller.readOnly;
//sets the read-only state of the form
forms.customer.controller.readOnly = true
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=view|class=node}{tr:id=name}{td}h6.view{td}{tr}{tr:id=des}{td}{sub-section:view_des|text=|trigger=button}{sub-section}{sub-section:view_des|trigger=none|class=sIndent}Get/Set the current type of view of this form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:view_snc|text=|trigger=button}{sub-section}{sub-section:view_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:view_prs|text=|trigger=button}{sub-section}{sub-section:view_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:view_ret|text=|trigger=button}{sub-section}{sub-section:view_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:view_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:view_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:view_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:view_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:view_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:view_sam|trigger=none}{code:language=javascript}
//gets the type of view for this form
var view = forms.customer.controller.view;
//sets the form to Record view
forms.customer.controller.view = 0;//RECORD_VIEW
//sets the form to List view
forms.customer.controller.view = 1;//LIST_VIEW
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=deleteAllRecords|class=node}{tr:id=name}{td}h6.deleteAllRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}deleteAllRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:deleteAllRecords_des|text=|trigger=button}{sub-section}{sub-section:deleteAllRecords_des|trigger=none|class=sIndent}Deletes all records in foundset, resulting in empty foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:deleteAllRecords_snc|text=|trigger=button}{sub-section}{sub-section:deleteAllRecords_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:deleteAllRecords_prs|text=|trigger=button}{sub-section}{sub-section:deleteAllRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:deleteAllRecords_ret|text=|trigger=button}{sub-section}{sub-section:deleteAllRecords_ret|trigger=none|class=sIndent}[Boolean] -- false incase of related foundset having records and orphans records are not allowed by the relation{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:deleteAllRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteAllRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:deleteAllRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteAllRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:deleteAllRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteAllRecords_sam|trigger=none}{code:language=javascript}
var success = forms.customer.controller.deleteAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=deleteRecord|class=node}{tr:id=name}{td}h6.deleteRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}deleteRecord{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:deleteRecord_des|text=|trigger=button}{sub-section}{sub-section:deleteRecord_des|trigger=none|class=sIndent}Delete current selected record, deletes mulitple selected records incase the foundset is using multiselect.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:deleteRecord_snc|text=|trigger=button}{sub-section}{sub-section:deleteRecord_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:deleteRecord_prs|text=|trigger=button}{sub-section}{sub-section:deleteRecord_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:deleteRecord_ret|text=|trigger=button}{sub-section}{sub-section:deleteRecord_ret|trigger=none|class=sIndent}[Boolean] -- false incase of related foundset having records and orphans records are not allowed by the relation{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:deleteRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:deleteRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:deleteRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:deleteRecord_sam|trigger=none}{code:language=javascript}
var success = forms.customer.controller.deleteRecord();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=duplicateRecord|class=node}{tr:id=name}{td}h6.duplicateRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}duplicateRecord{span}{span:id=iets|style=float: left;}\(\[location\]){span}{td}{tr}{tr:id=des}{td}{sub-section:duplicateRecord_des|text=|trigger=button}{sub-section}{sub-section:duplicateRecord_des|trigger=none|class=sIndent}Duplicate current record or record at index in the form foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:duplicateRecord_snc|text=|trigger=button}{sub-section}{sub-section:duplicateRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:duplicateRecord_prs|text=|trigger=button}{sub-section}{sub-section:duplicateRecord_prs|trigger=none|class=sIndent}\{[Boolean]} \[location\] -- boolean true adds the new record as the topmost record, or adds at specified index
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:duplicateRecord_ret|text=|trigger=button}{sub-section}{sub-section:duplicateRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if succesful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:duplicateRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:duplicateRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:duplicateRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:duplicateRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:duplicateRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:duplicateRecord_sam|trigger=none}{code:language=javascript}
forms.customer.controller.duplicateRecord(); //duplicate the current record, adds on top
//forms.customer.controller.duplicateRecord(false); //duplicate the current record, adds at bottom
//forms.customer.controller.duplicateRecord(1,2); //duplicate the first record as second record
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=find|class=node}{tr:id=name}{td}h6.find{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}find{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:find_des|text=|trigger=button}{sub-section}{sub-section:find_des|trigger=none|class=sIndent}Set the foundset in find mode. (Start a find request), use the "search" function to perform/exit the find.
Make sure the operator and the data (value) are part of the string passed to dataprovider (included inside a pair of quotation marks).

Syntax:
<dataprovidername> = '<operator>data'

Example:
if (controller.find()) //find will fail if autosave is disabled and there are unsaved records
\{
	columnTextDataProvider = '=a search value';
	columnNumberDataProvider = '>=10';
 columnDateDataProvider = '>=10\-03\-2009
Before going into find mode, all unsaved records will be saved in the database.
If this fails (due to validation failures or sql errors) or is not allowed (autosave off), the foundset will not go into find mode.
Make sure the operator and the data (value) are part of the string passed to dataprovider (included inside a pair of quotation marks).
Note: always make sure to check the result of the find() method.

When in find mode, columns can be assigned string expressions (including operators) that are evaluated as:
General:
      c1||c2    (condition1 or condition2)
      c|format  (apply format on condition like 'x|dd\-MM\-yyyy';
	controller.search()
}{sub-section}{)
      !c        (not condition)
      #c        (modify condition, depends on column type)
      ^         (is null)
      ^=        (is null or empty)
      &lt;x     (less than value x)
      &gt;x     (greater than value x)
      &lt;=x    (less than or equals value x)
      &gt;=x    (greater than or equals value x)
      x...y     (between values x and y, including values)
      x         (equals value x)

 Number fields:
      =x       (equals value x)
      ^=       (is null or zero)

 Date fields:
      #c       (equals value x, entire day)
      now      (equals now, date and or time)
      //       (equals today)
      today    (equals today)

 Text fields:
      #c	        (case insensitive condition)
      = x      (equals a space and 'x')
      ^=       (is null or empty)
      %x%      (contains 'x')
      %x\_y%    (contains 'x' followed by any char and 'y')
      \%      (contains char '%')
      &#92;_      (contains char '\_')

Related columns can be assigned, they will result in related searches.
For example, "employees\_to\_department.location\_id = headoffice" finds all employees in the specified location).

Searching on related aggregates is supported.
For example, "orders\_to\_details.total\_amount = '&gt;1000'" finds all orders with total order details amount more than 1000.
 
Arrays can be used for searching a number of values, this will result in an 'IN' condition that will be used in the search.
The values are not restricted to strings but can be any type that matches the column type.
For example, "record.department\_id = \[1, 33, 99\]"{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:find_snc|text=|trigger=button}{sub-section}{sub-section:find_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:find_prs|text=|trigger=button}{sub-section}{sub-section:find_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:find_ret|text=|trigger=button}{sub-section}{sub-section:find_ret|trigger=none|class=sIndent}[Boolean] -- true if the foundset is now in find mode, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:find_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:find_see|trigger=none}[.search|JSFoundset#search]\\ [databaseManager.setAutoSave|Database Manager#setAutoSave]\\ [controller.find|controller#find]\\ [controller.search|controller#search]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:find_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:find_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:find_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:find_sam|trigger=none}{code:language=javascript}
if (forms.customer.foundset.find()) //find will fail if autosave is disabled and there are unsaved records
{
	columnTextDataProvider = 'a search value'
 // for numbers you have to make sure to format it correctly so that the decimal point is in your locales notation (. or ,)
	columnNumberDataProvider = '>' + utils.numberFormat(anumber, '####.00');
	columnDateDataProvider = '31-12-2010|dd-MM-yyyy'
	forms.customer.foundset.search()
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=focusField|class=node}{tr:id=name}{td}h6.focusField{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}focusField{span}{span:id=iets|style=float: left;}\(fieldName, skipReadonly){span}{td}{tr}{tr:id=des}{td}{sub-section:focusField_des|text=|trigger=button}{sub-section}{sub-section:focusField_des|trigger=none|class=sIndent}Sets focus to a field specified by its name. 
If the second parameter is set to true, then readonly fields will be skipped 
(the focus will be set to the first non\-readonly field located after the field with the specified name; the tab sequence is respected when searching for the non\-readonly field).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:findfocusField_snc|text=|trigger=button}{sub-section}{sub-section:findfocusField_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:findfocusField_prs|text=|trigger=button}{sub-section}{sub-section:findfocusField_prs|trigger=none|class=sIndent}=sIndent}\{[String]} fieldName -- the name of the field to be focussed
\{[Boolean]} skipReadonly -- indication to skip read only fields, if the named field happens to be read only
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:findfocusField_ret|text=|trigger=button}{sub-section}{sub-section:findfocusField_ret|trigger=none|class=sIndent}[Boolean] -- true if successful, will return false if autosave is disabled and there are unsaved records.void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:findfocusField_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:findfocusField_see|trigger=none}[controller.search|controller#search]\\ [databaseManager.setAutoSave|Database Manager#setAutoSave]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:findfocusField_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:findfocusField_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:findfocusField_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:findfocusField_sam|trigger=none}{code:language=javascript}
if (var tabseq = forms.customer.controller.getTabSequence();
if (tabseq.length > 1) {
	// If there is more than one field in the tab sequence, 
	// focus the second one and skip over readonly fields.
	forms.customer.controller.find()) //find will fail if autosave is disabled and there are unsaved records
{
	columnTextDataProvider = '=a search value';
	columnNumberDataProvider = '>10';
	columnDateDataProvider = '>=10-03-2009|dd-MM-yyyy';focusField(tabseq[1], true);
}
else {
	// If there is at most one field in the tab sequence, then focus
	// whatever field is first, and don't bother to skip over readonly fields.
	forms.customer.controller.searchfocusField(null, false);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=focusFieldfocusFirstField|class=node}{tr:id=name}{td}h6.focusFieldfocusFirstField{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}focusFieldfocusFirstField{span}{span:id=iets|style=float: left;}\(fieldName, skipReadonly){span}{td}{tr}{tr:id=des}{td}{sub-section:focusFieldfocusFirstField_des|text=|trigger=button}{sub-section}{sub-section:focusFieldfocusFirstField_des|trigger=none|class=sIndent}Sets focus to a field specified by its name. 
If the second parameter is set to true, then readonly fields will be skipped 
(the focus will be set to the first non\-readonly field located after the field with the specified name; the tab sequence is respected when searching for the non\-readonly field)Sets focus to the first field of the form; based on tab order sequence.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:focusFieldfocusFirstField_snc|text=|trigger=button}{sub-section}{sub-section:focusFieldfocusFirstField_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:focusFieldfocusFirstField_prs|text=|trigger=button}{sub-section}{sub-section:focusFieldfocusFirstField_prs|trigger=none|class=sIndent}\{[String]} fieldName -- the name of the field to be focussed
\{[Boolean]} skipReadonly -- boolean indication to skip read only fields, if the named field happens to be read only
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:focusFieldfocusFirstField_ret|text=|trigger=button}{sub-section}{sub-section:focusFieldfocusFirstField_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:focusFieldfocusFirstField_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFieldfocusFirstField_see|trigger=none}[controller.focusField|controller#focusField]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:focusFieldfocusFirstField_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFieldfocusFirstField_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:focusFieldfocusFirstField_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusField_sam|trigger=none}{code:language=javascript}
var tabseq = forms.customer.controller.getTabSequence();
if (tabseq.length > 1) {
	// If there is more than one field in the tab sequence, 
	// focus the second one and skip over readonly fields.
	forms.customer.controller.focusField(tabseq[1], true);
}
else {
	// If there is at most one field in the tab sequence, then focus
	// whatever field is first, and don't bother to skip over readonly fields.
	{sub-section:focusFirstField_sam|trigger=none}{code:language=javascript}
forms.customer.controller.focusFieldfocusFirstField(null, false);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=focusFirstFieldgetDataProviderMaxLength|class=node}{tr:id=name}{td}h6.focusFirstFieldgetDataProviderMaxLength{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}focusFirstFieldgetDataProviderMaxLength{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:focusFirstFieldgetDataProviderMaxLength_des|text=|trigger=button}{sub-section}{sub-section:focusFirstFieldgetDataProviderMaxLength_des|trigger=none|class=sIndent}SetsReturns focusthe tomaximum thelength firstallowed fieldin of the form; based on tab order sequencespecified dataprovider.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:focusFirstFieldgetDataProviderMaxLength_snc|text=|trigger=button}{sub-section}{sub-section:focusFirstFieldgetDataProviderMaxLength_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:focusFirstFieldgetDataProviderMaxLength_prs|text=|trigger=button}{sub-section}{sub-section:focusFirstFieldgetDataProviderMaxLength_prs|trigger=none|class=sIndent}\{[String]} name -- the dataprovider name
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:focusFirstFieldgetDataProviderMaxLength_ret|text=|trigger=button}{sub-section}{sub-section:focusFirstFieldgetDataProviderMaxLength_ret|trigger=none|class=sIndent}void[Number] -- the length{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:focusFirstFieldgetDataProviderMaxLength_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstFieldgetDataProviderMaxLength_see|trigger=none}[controller.focusField|controller#focusField]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:focusFirstFieldgetDataProviderMaxLength_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstFieldgetDataProviderMaxLength_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:focusFirstFieldgetDataProviderMaxLength_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstFieldgetDataProviderMaxLength_sam|trigger=none}{code:language=javascript}
forms.customer.controller.focusFirstFieldgetDataProviderMaxLength('name');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getContainerNamegetDataProviderValue|class=node}{tr:id=name}{td}h6.getContainerNamegetDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringObject]{span}{span:id=iets|style=float: left; font-weight: bold;}getContainerNamegetDataProviderValue{span}{span:id=iets|style=float: left;}\(dataProvider){span}{td}{tr}{tr:id=des}{td}{sub-section:getContainerNamegetDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:getContainerNamegetDataProviderValue_des|trigger=none|class=sIndent}GetGets a thevalue namebased ofon the window/dialogspecified this form is displayed indataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getContainerNamegetDataProviderValue_snc|text=|trigger=button}{sub-section}{sub-section:getContainerNamegetDataProviderValue_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:getContainerNamegetDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:getContainerNamegetDataProviderValue_prs|trigger=none|class=sIndent}\{[String]} dataProvider -- the dataprovider name to retieve the value for
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getContainerNamegetDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:getContainerNamegetDataProviderValue_ret|trigger=none|class=sIndent}[String] -- the name of the window/dialog this form is displayed in. IfObject] -- the form is not showing in a window or dialog (other then main application frame), it returns null.dataprovider value (null if unknown dataprovider){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getContainerNamegetDataProviderValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getContainerNamegetDataProviderValue_see|trigger=none}[application.showFormInDialog|Application#showFormInDialog]\\ [application.showFormInWindow|Application#showFormInWindow]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getContainerNamegetDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getContainerNamegetDataProviderValue_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getContainerNamegetDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getContainerNamegetDataProviderValue_sam|trigger=none}{code:language=javascript}
var dialogOrWindowNameval = forms.customer.controller.getContainerNamegetDataProviderValue('contact_name');
	if (dialogOrWindowName != null) {
		application.closeForm(dialogOrWindowName);
	}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderMaxLengthgetDataSource|class=node}{tr:id=name}{td}h6.getDataProviderMaxLengthgetDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[NumberString]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderMaxLengthgetDataSource{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderMaxLengthgetDataSource_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLengthgetDataSource_des|trigger=none|class=sIndent}ReturnsGet the maximum length allowed in the specified dataproviderused datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderMaxLengthgetDataSource_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLengthgetDataSource_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:getDataProviderMaxLengthgetDataSource_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLengthgetDataSource_prs|trigger=none|class=sIndent}\{[String]} name -- the dataprovider name
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderMaxLengthgetDataSource_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLengthgetDataSource_ret|trigger=none|class=sIndent}[NumberString] -- the lengthdatasource{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderMaxLengthgetDataSource_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLengthgetDataSource_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderMaxLengthgetDataSource_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLengthgetDataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderMaxLengthgetDataSource_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLengthgetDataSource_sam|trigger=none}{code:language=javascript}
var dataSource = forms.customer.controller.getDataProviderMaxLengthgetDataSource('name');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderValuegetDesignMode|class=node}{tr:id=name}{td}h6.getDataProviderValuegetDesignMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[ObjectBoolean]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderValuegetDesignMode{span}{span:id=iets|style=float: left;}\(dataProvider){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderValuegetDesignMode_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuegetDesignMode_des|trigger=none|class=sIndent}GetsReturns athe valuestate basedof onthis the specified dataprovider nameform designmode.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderValuegetDesignMode_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuegetDesignMode_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:getDataProviderValuegetDesignMode_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuegetDesignMode_prs|trigger=none|class=sIndent}\{[String]} dataProvider -- the dataprovider name to retieve the value for
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderValuegetDesignMode_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuegetDesignMode_ret|trigger=none|class=sIndent}[ObjectBoolean] -- the design dataprovidermode valuestate (null if unknown dataprovidertrue/fase){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderValuegetDesignMode_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuegetDesignMode_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderValuegetDesignMode_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuegetDesignMode_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderValuegetDesignMode_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuegetDesignMode_sam|trigger=none}{code:language=javascript}
var valsuccess = forms.customer.controller.getDataProviderValuegetDesignMode('contact_name');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSourcegetFormContext|class=node}{tr:id=name}{td}h6.getDataSourcegetFormContext{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringJSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSourcegetFormContext{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSourcegetFormContext_des|text=|trigger=button}{sub-section}{sub-section:getDataSource_des|trigger=none|class=sIndent}Get the used datasourcegetFormContext_des|trigger=none|class=sIndent}Gets the forms context where it resides, returns a dataset of its structure to the main controller.
Note: can't be called in onload, because no context is yet available at this time.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSourcegetFormContext_snc|text=|trigger=button}{sub-section}{sub-section:getDataSourcegetFormContext_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:getDataSourcegetFormContext_prs|text=|trigger=button}{sub-section}{sub-section:getDataSourcegetFormContext_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSourcegetFormContext_ret|text=|trigger=button}{sub-section}{sub-section:getDataSourcegetFormContext_ret|trigger=none|class=sIndent}[StringJSDataSet] -- the datasource dataset with form context{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSourcegetFormContext_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourcegetFormContext_see|trigger=none}[.|JSDataSet]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSourcegetFormContext_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourcegetFormContext_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSourcegetFormContext_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourcegetFormContext_sam|trigger=none}{code:language=javascript}
var dataSourcedataset = forms.customer.controller.getDataSource();getFormContext();
if (dataset.getMaxRowIndex() > 1) 
{
	// form is in a tabpanel
	//dataset columns: [containername(1),formname(2),tabpanel or beanname(3),tabname(4),tabindex(5)]
	//dataset rows: mainform(1) -> parent(2)  -> current form(3) (when 3 forms deep)
	var parentFormName = dataset.getValue(1,2)
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDesignModegetFormWidth|class=node}{tr:id=name}{td}h6.getDesignModegetFormWidth{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getDesignModegetFormWidth{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDesignModegetFormWidth_des|text=|trigger=button}{sub-section}{sub-section:getDesignModegetFormWidth_des|trigger=none|class=sIndent}ReturnsGets the stateform ofwidth thisin form designmodepixels.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDesignModegetFormWidth_snc|text=|trigger=button}{sub-section}{sub-section:getDesignModegetFormWidth_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:getDesignModegetFormWidth_prs|text=|trigger=button}{sub-section}{sub-section:getDesignModegetFormWidth_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDesignModegetFormWidth_ret|text=|trigger=button}{sub-section}{sub-section:getDesignModegetFormWidth_ret|trigger=none|class=sIndent}[BooleanNumber] -- the designwidth mode state (true/fase)in pixels{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDesignModegetFormWidth_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignModegetFormWidth_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDesignModegetFormWidth_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignModegetFormWidth_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDesignModegetFormWidth_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignModegetFormWidth_sam|trigger=none}{code:language=javascript}
var successwidth = forms.customer.controller.getDesignModegetFormWidth();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFormContextgetMaxRecordIndex|class=node}{tr:id=name}{td}h6.getFormContextgetMaxRecordIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSetNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getFormContextgetMaxRecordIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getFormContextgetMaxRecordIndex_des|text=|trigger=button}{sub-section}{sub-section:getFormContextgetMaxRecordIndex_des|trigger=none|class=sIndent}GetsReturns the forms context where it resides, returns a dataset of its structure to the main controller.
Note: can't be called in onload, because no context is yet available at this time.current cached record count of the current foundset. 
To return the full foundset count, use: databaseManager.getFoundSetCount(...) 
Tip: get the the table count of all rows in a table, use: databaseManager.getTableCount(...){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFormContextgetMaxRecordIndex_snc|text=|trigger=button}{sub-section}{sub-section:getFormContextgetMaxRecordIndex_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:getFormContextgetMaxRecordIndex_prs|text=|trigger=button}{sub-section}{sub-section:getFormContextgetMaxRecordIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getFormContextgetMaxRecordIndex_ret|text=|trigger=button}{sub-section}{sub-section:getFormContextgetMaxRecordIndex_ret|trigger=none|class=sIndent}[JSDataSetNumber] -- the datasetmax withrecord form contextindex{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFormContextgetMaxRecordIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContextgetMaxRecordIndex_see|trigger=none}[JSDataSetdatabaseManager.getFoundSetCount|JSDataSetDatabase Manager#getFoundSetCount]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFormContextgetMaxRecordIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContextgetMaxRecordIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFormContextgetMaxRecordIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContextgetMaxRecordIndex_sam|trigger=none}{code:language=javascript}
for ( var dataset  i = 1 ; i <= forms.customer.controller.getFormContextgetMaxRecordIndex() ; if (dataset.getMaxRowIndex() > 1i++ )

{
	// form is in a tabpanel
	//dataset columns: [containername(1),formname(2),tabpanel or beanname(3),tabname(4),tabindex(5)]
	//dataset rows: mainform(1) -> parent(2)  -> current form(3) (when 3 forms deep)
	var parentFormName = dataset.getValue(1,2)
forms.customer.controller.setSelectedIndex(i);
	//do some action per record
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFormWidthgetName|class=node}{tr:id=name}{td}h6.getFormWidthgetName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[NumberString]{span}{span:id=iets|style=float: left; font-weight: bold;}getFormWidthgetName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getFormWidthgetName_des|text=|trigger=button}{sub-section}{sub-section:getFormWidthgetName_des|trigger=none|class=sIndent}GetsGet the formname widthof inthis pixelsform.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFormWidthgetName_snc|text=|trigger=button}{sub-section}{sub-section:getFormWidthgetName_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:getFormWidthgetName_prs|text=|trigger=button}{sub-section}{sub-section:getFormWidthgetName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getFormWidthgetName_ret|text=|trigger=button}{sub-section}{sub-section:getFormWidthgetName_ret|trigger=none|class=sIndent}[NumberString] -- the width in pixelsname{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFormWidthgetName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidthgetName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFormWidthgetName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidthgetName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFormWidthgetName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidthgetName_sam|trigger=none}{code:language=javascript}
var widthformName = forms.customer.controller.getFormWidthgetName();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMaxRecordIndexgetPartHeight|class=node}{tr:id=name}{td}h6.getMaxRecordIndexgetPartHeight{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMaxRecordIndexgetPartHeight{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getMaxRecordIndexgetPartHeight_des|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndexgetPartHeight_des|trigger=none|class=sIndent}ReturnsGets the current cached record count of the current foundset. 
To return the full foundset count, use: databaseManager.getFoundSetCount(...) 
Tip: get the the table count of all rows in a table, use: databaseManager.getTableCount(...)part height in pixels.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMaxRecordIndexgetPartHeight_snc|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndexgetPartHeight_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:getMaxRecordIndexgetPartHeight_prs|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndexgetPartHeight_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose height will be returned.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMaxRecordIndexgetPartHeight_ret|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndexgetPartHeight_ret|trigger=none|class=sIndent}[Number] -- the maxpart height recordin indexpixels{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMaxRecordIndexgetPartHeight_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndexgetPartHeight_see|trigger=none}[databaseManager.getFoundSetCount|Database Manager#getFoundSetCount]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMaxRecordIndexgetPartHeight_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndexgetPartHeight_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMaxRecordIndexgetPartHeight_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndexgetPartHeight_sam|trigger=none}{code:language=javascript}
for ( var i = 1 ; i <=javascript}
var height = forms.customer.controller.getMaxRecordIndex() ; i++ )
{
	forms.customer.controller.setSelectedIndex(i);
	//do some action per record
}
getPartHeight(JSPart.BODY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getNamegetPartYOffset|class=node}{tr:id=name}{td}h6.getNamegetPartYOffset{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getNamegetPartYOffset{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getNamegetPartYOffset_des|text=|trigger=button}{sub-section}{sub-section:getNamegetPartYOffset_des|trigger=none|class=sIndent}GetReturns the name Y offset of a given part of thisthe form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getNamegetPartYOffset_snc|text=|trigger=button}{sub-section}{sub-section:getNamegetPartYOffset_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:getNamegetPartYOffset_prs|text=|trigger=button}{sub-section}{sub-section:getNamegetPartYOffset_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose Y offset will be returned.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getNamegetPartYOffset_ret|text=|trigger=button}{sub-section}{sub-section:getNamegetPartYOffset_ret|trigger=none|class=sIndent}[StringNumber] -- A number holding the name Y offset of the specified form part.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getNamegetPartYOffset_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNamegetPartYOffset_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getNamegetPartYOffset_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNamegetPartYOffset_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getNamegetPartYOffset_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNamegetPartYOffset_sam|trigger=none}{code:language=javascript}
var formNameoffset = forms.customer.controller.getNamegetPartYOffset(JSPart.BODY);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPartHeightgetSelectedIndex|class=node}{tr:id=name}{td}h6.getPartHeightgetSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getPartHeightgetSelectedIndex{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getPartHeightgetSelectedIndex_des|text=|trigger=button}{sub-section}{sub-section:getPartHeightgetSelectedIndex_des|trigger=none|class=sIndent}Gets the part height in pixels current record index of the current foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPartHeightgetSelectedIndex_snc|text=|trigger=button}{sub-section}{sub-section:getPartHeightgetSelectedIndex_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:getPartHeightgetSelectedIndex_prs|text=|trigger=button}{sub-section}{sub-section:getPartHeightgetSelectedIndex_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose height will be returned.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getPartHeightgetSelectedIndex_ret|text=|trigger=button}{sub-section}{sub-section:getPartHeightgetSelectedIndex_ret|trigger=none|class=sIndent}[Number] -- the part height in pixelsindex{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPartHeightgetSelectedIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeightgetSelectedIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPartHeightgetSelectedIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeightgetSelectedIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPartHeightgetSelectedIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeightgetSelectedIndex_sam|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var heightcurrent = forms.customer.controller.getPartHeight(JSPart.BODYgetSelectedIndex();
//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=getPartYOffsetgetTabSequence|class=node}{tr:id=name}{td}h6.getPartYOffsetgetTabSequence{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[NumberString]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getPartYOffsetgetTabSequence{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getPartYOffsetgetTabSequence_des|text=|trigger=button}{sub-section}{sub-section:getPartYOffsetgetTabSequence_des|trigger=none|class=sIndent}Returns the Y offset of a given part of the formGet an array with the names of the components that are part of the tab sequence. 
The order of the names respects the order of the tab sequence. 
Components that are not named will not appear in the returned array, although they may be in the tab sequence.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPartYOffsetgetTabSequence_snc|text=|trigger=button}{sub-section}{sub-section:getPartYOffsetgetTabSequence_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:getPartYOffsetgetTabSequence_prs|text=|trigger=button}{sub-section}{sub-section:getPartYOffsetgetTabSequence_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose Y offset will be returned.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getPartYOffsetgetTabSequence_ret|text=|trigger=button}{sub-section}{sub-section:getPartYOffsetgetTabSequence_ret|trigger=none|class=sIndent}[NumberString]\[] -- A number holding the Y offset of the specified form part.array of names{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPartYOffsetgetTabSequence_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffsetgetTabSequence_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPartYOffsetgetTabSequence_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffsetgetTabSequence_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPartYOffsetgetTabSequence_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffset_sam|trigger=none}{code:language=javascript}
var offset = }{sub-section:getTabSequence_sam|trigger=none}{code:language=javascript}
var tabseq = forms.customer.controller.getTabSequence();
if (tabseq.length > 1) {
	// If there is more than one field in the tab sequence, 
	// focus the second one and skip over readonly fields.
	forms.customer.controller.focusField(tabseq[1], true);
}
else {
	// If there is at most one field in the tab sequence, then focus
	// whatever field is first, and don't bother to skip over readonly fields.
	forms.customer.controller.getPartYOffset(JSPart.BODYfocusField(null, false);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSelectedIndexgetWindow|class=node}{tr:id=name}{td}h6.getSelectedIndexgetWindow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[NumberJSWindow]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedIndexgetWindow{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getSelectedIndexgetWindow_des|text=|trigger=button}{sub-section}{sub-section:getSelectedIndexgetWindow_des|trigger=none|class=sIndent}Gets the current record index of the current foundsetReturns the JSWindow that the form is shown in, or null if the form is not currently showing in a window.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSelectedIndexgetWindow_snc|text=|trigger=button}{sub-section}{sub-section:getSelectedIndexgetWindow_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:getSelectedIndexgetWindow_prs|text=|trigger=button}{sub-section}{sub-section:getSelectedIndexgetWindow_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSelectedIndexgetWindow_ret|text=|trigger=button}{sub-section}{sub-section:getSelectedIndexgetWindow_ret|trigger=none|class=sIndent}[NumberJSWindow] -- the JSWindow that the form is shown in, or null if the index form is not currently showing in a window.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSelectedIndexgetWindow_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndexgetWindow_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSelectedIndexgetWindow_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndexgetWindow_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSelectedIndexgetWindow_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndexgetWindow_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);var currentWindow = controller.getWindow();
if (currentWindow != null) {
		currentWindow.title = 'We have a new title';
} else {
		currentWindow = application.createWindow("Window Name", JSWindow.WINDOW, null);
		currentWindow(650, 700, 450, 350);
		currentWindow = "Window Title";
		controller.show(currentWindow);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTabSequenceinvertRecords|class=node}{tr:id=name}{td}h6.getTabSequenceinvertRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringBoolean]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTabSequence{span}{span:id=iets|style=float: left;}\(){span}invertRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:invertRecords_des|text=|trigger=button}{sub-section}{sub-section:invertRecords_des|trigger=none|class=sIndent}Inverts the current foundset against all rows of the current table; all records that are not in the foundset will become the current foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:invertRecords_snc|text=|trigger=button}{sub-section}{sub-section:invertRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=desprs}{td}*Parameters*\\{sub-section:getTabSequenceinvertRecords_desprs|text=|trigger=button}{sub-section}{sub-section:getTabSequenceinvertRecords_desprs|trigger=none|class=sIndent}Get an array with the names of the components that are part of the tab sequence. 
The order of the names respects the order of the tab sequence. 
Components that are not named will not appear in the returned array, although they may be in the tab sequence.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:getTabSequenceinvertRecords_sncret|text=|trigger=button}{sub-section}{sub-section:getTabSequenceinvertRecords_sncret|trigger=none|class=sIndent}[Boolean] Replace-- withtrue versionif infosuccessful{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prssee}{td}*ParametersAlso see*\\{sub-section:getTabSequenceinvertRecords_prssee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequenceinvertRecords_prssee|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retlink}{td}*ReturnsExternal links*\\{sub-section:getTabSequenceinvertRecords_retlink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequenceinvertRecords_retlink|trigger=none|class=sIndent}[String]\[] -- array of names{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:getTabSequenceinvertRecords_seesam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequenceinvertRecords_seesam|trigger=none}{code:language=javascript}
forms.customer.controller.invertRecords();
{code}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edittr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadAllRecords|class=node}{tr:id=name}{td}h6.loadAllRecords{td}{tr}{tr:id=linksig}{td}*External links*\\{sub-section:getTabSequence_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequence_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadAllRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=samdes}{td}*Sample*\\{sub-section:getTabSequenceloadAllRecords_samdes|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequenceloadAllRecords_samdes|trigger=none}{code:language=javascript}
var tabseq = forms.customer.controller.getTabSequence();
if (tabseq.length > 1) {
	// If there is more than one field in the tab sequence, 
	// focus the second one and skip over readonly fields.
	forms.customer.controller.focusField(tabseq[1], true);
}
else {
	// If there is at most one field in the tab sequence, then focus
	// whatever field is first, and don't bother to skip over readonly fields.
	forms.customer.controller.focusField(null, false);
}
{code}{sub-section}{div|class=sIndent}Loads all accessible records from the datasource into the form foundset.
When the form contains a related foundset it will be replaced by a default foundset on same datasource.

Notes: 
\-the default foundset is always limited by filters, if databaseManager.addFoundSetFilterParam function is used.
\-typical use is loading the normal foundset again after form usage in a related tabpanel{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:loadAllRecords_snc|text=|trigger=button}{sub-section}{sub-section:loadAllRecords_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:loadAllRecords_prs|text=|trigger=button}{sub-section}{sub-section:loadAllRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=invertRecords|class=node}{tr:id=name}{td}h6.invertRecords{td}{tr*Returns*\\{sub-section:loadAllRecords_ret|text=|trigger=button}{sub-section}{sub-section:loadAllRecords_ret|trigger=none|class=sIndent}[Boolean] -- true if successful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sigsee}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}invertRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr*Also see*\\{sub-section:loadAllRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadAllRecords_see|trigger=none}[databaseManager.addTableFilterParam|Database Manager#addTableFilterParam]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=deslink}{td}*External links*\\{sub-section:invertRecordsloadAllRecords_deslink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecordsloadAllRecords_deslink|trigger=none|class=sIndent}Inverts the current foundset against all rows of the current table; all records that are not in the foundset will become the current foundset.{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:invertRecordsloadAllRecords_sncsam|text=|trigger=button}{sub-section}{sub-section:invertRecords_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:invertRecords_prs|text=|trigger=button}{sub-section}{sub-section:invertRecords_prs|trigger=none|class=sIndent}{sub-section}{div:class=sIndent}{sub-section:loadAllRecords_sam|trigger=none}{code:language=javascript}
forms.customer.controller.loadAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadOmittedRecords|class=node}{tr:id=name}{td}h6.loadOmittedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadOmittedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show}{tr:id=retdes}{td}*Returns*\\{sub-section:invertRecordsloadOmittedRecords_retdes|text=|trigger=button}{sub-section}{sub-section:invertRecordsloadOmittedRecords_retdes|trigger=none|class=sIndent}[Boolean] -- true if successfulLoads the records that are currently omitted in the form foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seesnc}{td}*Also seeSince*\\{sub-section:invertRecordsloadOmittedRecords_seesnc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecordsloadOmittedRecords_seesnc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:invertRecordsloadOmittedRecords_linkprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecordsloadOmittedRecords_linkprs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:invertRecordsloadOmittedRecords_samret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecordsloadOmittedRecords_samret|trigger=none}{code:language=javascript}
forms.customer.controller.invertRecords();
{code}|class=sIndent}[Boolean] -- true if successful{sub-section}{div}{td}{tr}{trbuilder-show:classpermission=lastDetailRowedit}{td}{td}{tr}{tbody}{tbody:id=loadAllRecords|class=nodesee}{tr:id=name}{td}h6.loadAllRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadAllRecords{span}{span:id=iets|style=float: left;}\(){spantd}*Also see*\\{sub-section:loadOmittedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=deslink}{td}*External links*\\{sub-section:loadAllRecordsloadOmittedRecords_deslink|text=|trigger=button}{sub-section}{sub-section:loadAllRecords_des|trigger=none|class=sIndent}Loads all accessible records from the datasource into the form foundset.
When the form contains a related foundset it will be replaced by a default foundset on same datasource.

Notes: 
\-the default foundset is always limited by filters, if databaseManager.addFoundSetFilterParam function is used.
\-typical use is loading the normal foundset again after form usage in a related tabpaneldiv:class=sIndent}{sub-section:loadOmittedRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:loadAllRecordsloadOmittedRecords_sncsam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadAllRecordsloadOmittedRecords_sncsam|trigger=none|class=sIndent} Replace with version info}{code:language=javascript}
forms.customer.controller.loadOmittedRecords();
{code}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edittr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadRecords|class=node}{tr:id=name}{td}h6.loadRecords{td}{tr}{tr:id=prssig}{td}*Parameters*\\{sub-section:loadAllRecords_prs|text=|trigger=button}{sub-section}{sub-section:loadAllRecords_prs|trigger=none|class=sIndent}{sub-section{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadRecords{span}{span:id=iets|style=float: left;}\(\[data\], \[queryArgumentsArray\]){span}{td}{tr}{builder-show}{tr:id=retdes}{td}*Returns*\\{sub-section:loadAllRecordsloadRecords_retdes|text=|trigger=button}{sub-section}{sub-section:loadRecords_des|trigger=none|class=sIndent}Load records via a (related) foundset, primary key (dataset/number/uuid) or query into the form.

Load records can be used in 5 different ways
1) to load a (related)foundset into the form.
the form will no longer share the default foundset with forms of the same datasource, use loadAllRecords_ret|trigger=none|class=sIndent}[Boolean] -- true if successful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:loadAllRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadAllRecords_see|trigger=none}[databaseManager.addTableFilterParam|Database Manager#addTableFilterParam]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:loadAllRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadAllRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:loadAllRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadAllRecords_sam|trigger=none}{code:language=javascript}
forms.customer.controller.loadAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadOmittedRecords|class=node}{tr:id=name}{td}h6.loadOmittedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadOmittedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:loadOmittedRecords_des|text=|trigger=button}{sub-section}{sub-section:loadOmittedRecords_des|trigger=none|class=sIndent}Loads the records that are currently omitted in the form foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:loadOmittedRecords_snc|text=|trigger=button}{sub-section}{sub-section:loadOmittedRecords_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:loadOmittedRecords_prs|text=|trigger=button}{sub-section}{sub-section:loadOmittedRecords_prs|trigger=none|class=sIndent} to restore the default foundset 
controller.loadRecords(order\_to\_orderdetails);

2) to load a primary key dataset, will remove related sort!
var dataset = databaseManager.getDataSetByQuery(...);
controller.loadRecords(dataset);

3) to load a single record by primary key, will remove related sort! (pk should be a number or UUID)
controller.loadRecords(123);
or
controller.loadRecords(application.getUUID('6b5e2f5d\-047e\-45b3\-80ee\-3a32267b1f20'));

4) to reload all last related records again, if for example after a search in related tabpanel
controller.loadRecords();

5) to load records in to the form based on a query (also known as 'Form by query')
controller.loadRecords(sqlstring,parameters);
limitations/requirements for sqlstring are:
\-must start with 'select'
\-the selected columns must be the (Servoy Form) table primary key columns (alphabetically ordered like 'select a\_id, b\_id,c\_id ...')
\-can contain '?' which are replaced with values from the array supplied to parameters argument
 if the sqlstring contains an 'order by' clause, the records will be sorted accordingly and additional constraints apply:
\-must contain 'from' keyword
\-the 'from' must be a comma separated list of table names
\-must at least select from the table used in Servoy Form
\-cannot contain 'group by', 'having' or 'union'
\-all columns must be fully qualified like 'orders.order\_id'{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:loadOmittedRecordsloadRecords_retsnc|text=|trigger=button}{sub-section}{sub-section:loadOmittedRecordsloadRecords_retsnc|trigger=none|class=sIndent}[Boolean] --Replace truewith ifversion successfulinfo{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:loadOmittedRecordsloadRecords_seeprs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecordsloadRecords_seeprs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:loadOmittedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecords_link|trigger=none}|class=sIndent}\[data\] -- the foundset/pkdataset/singlenNmber\_pk/UUIDpk/queryString to load
\[queryArgumentsArray\] -- the arguments to replace the questions marks in the queryString
{sub-section}{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:loadOmittedRecordsloadRecords_samret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecordsloadRecords_samret|trigger=none}{code:language=javascript}
forms.customer.controller.loadOmittedRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadRecords|class=node}{tr:id=name}{td}h6.loadRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}loadRecords{span}{span:id=iets|style=float: left;}\(\[data\], \[queryArgumentsArray\]){spansIndent}[Boolean] -- true if successful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessee}{td}*Also see*\\{sub-section:loadRecords_dessee|text=|trigger=button}{sub-section}{sub-section:loadRecords_des|trigger=none|class=sIndent}Load records via a (related) foundset, primary key (dataset/number/uuid) or query into the form.

Load records can be used in 5 different ways
1) to load a (related)foundset into the form.
the form will no longer share the default foundset with forms of the same datasource, use loadAllRecords to restore the default foundset 
controller.loadRecords(order\_to\_orderdetails);

2) to load a primary key dataset, will remove related sort!
var dataset = databaseManager.getDataSetByQuery(...);
controller.loadRecords(dataset);

3) to load a single record by primary key, will remove related sort! (pk should be a number or UUID)
controller.loadRecords(123);
or
controller.loadRecords(application.getUUID('6b5e2f5d\-047e\-45b3\-80ee\-3a32267b1f20'));

4) to reload all last related records again, if for example after a search in related tabpanel
controller.loadRecords();

5) to load records in to the form based on a query (also known as 'Form by query')
controller.loadRecords(sqlstring,parameters);
limitations/requirements for sqlstring are:
\-must start with 'select'
\-the selected columns must be the (Servoy Form) table primary key columns (alphabetically ordered like 'select a\_id, b\_id,c\_id ...')
\-can contain '?' which are replaced with values from the array supplied to parameters argument
 if the sqlstring contains an 'order by' clause, the records will be sorted accordingly and additional constraints apply:
\-must contain 'from' keyword
\-the 'from' must be a comma separated list of table names
\-must at least select from the table used in Servoy Form
\-cannot contain 'group by', 'having' or 'union'
\-all columns must be fully qualified like 'orders.order\_id'{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:loadRecords_snc|text=|trigger=button}{sub-section}{sub-section:loadRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:loadRecords_prs|text=|trigger=button}{sub-section}{sub-section:loadRecords_prs|trigger=none|class=sIndent}\[data\] -- the foundset/pkdataset/singlenNmber\_pk/UUIDpk/queryString to load
\[queryArgumentsArray\] -- the arguments to replace the questions marks in the queryString
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:loadRecords_ret|text=|trigger=button}{sub-section}{sub-section:loadRecords_ret|trigger=none|class=sIndent}[Boolean] -- true if successful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:loadRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadRecords_see|trigger=none}[JSFoundset.loadRecords|JSFoundset#loadRecords]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:loadRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:loadRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadRecords_sam|trigger=none}{code:language=javascript}
//Load records can be used in 5 different ways
//1) to load a (related)foundset into the form.
//the form will no longer share the default foundset with forms of the same datasource, use loadAllRecords to restore the default foundset 
//forms.customer.controller.loadRecords(order_to_orderdetails);

//2) to load a primary key dataset, will remove related sort!
//var dataset = databaseManager.getDataSetByQuery(...);
// dataset must match the table primary key columns (alphabetically ordered)
//forms.customer.controller.loadRecords(dataset);

//3) to load a single record by primary key, will remove related sort! (pk should be a number or UUID)
//forms.customer.controller.loadRecords(123);
//forms.customer.controller.loadRecords(application.getUUID('6b5e2f5d-047e-45b3-80ee-3a32267b1f20'));

//4) to reload all last related records again, if for example after a search in related tabpanel
//forms.customer.controller.loadRecords();

//5) to load records in to the form based on a query (also known as 'Form by query')
//forms.customer.controller.loadRecords(sqlstring,parameters);
//limitations/requirements for sqlstring are:
//-must start with 'select'
//-the selected columns must be the (Servoy Form) table primary key columns (alphabetically ordered like 'select a_id, b_id,c_id ...')
//-can contain '?' which are replaced with values from the array supplied to parameters argument
// if the sqlstring contains an 'order by' clause, the records will be sorted accordingly and additional constraints apply:
//-must contain 'from' keyword
//-the 'from' must be a comma separated list of table names
//-must at least select from the table used in Servoy Form
//-cannot contain 'group by', 'having' or 'union'
//-all columns must be fully qualified like 'orders.order_id'div:class=sIndent}{sub-section:loadRecords_see|trigger=none}[.loadRecords|JSFoundset#loadRecords]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:loadRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:loadRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadRecords_sam|trigger=none}{code:language=javascript}
//Load records can be used in 5 different ways
//1) to load a (related)foundset into the form.
//the form will no longer share the default foundset with forms of the same datasource, use loadAllRecords to restore the default foundset 
//forms.customer.controller.loadRecords(order_to_orderdetails);

//2) to load a primary key dataset, will remove related sort!
//var dataset = databaseManager.getDataSetByQuery(...);
// dataset must match the table primary key columns (alphabetically ordered)
//forms.customer.controller.loadRecords(dataset);

//3) to load a single record by primary key, will remove related sort! (pk should be a number or UUID)
//forms.customer.controller.loadRecords(123);
//forms.customer.controller.loadRecords(application.getUUID('6b5e2f5d-047e-45b3-80ee-3a32267b1f20'));

//4) to reload all last related records again, if for example after a search in related tabpanel
//forms.customer.controller.loadRecords();

//5) to load records in to the form based on a query (also known as 'Form by query')
//forms.customer.controller.loadRecords(sqlstring,parameters);
//limitations/requirements for sqlstring are:
//-must start with 'select'
//-the selected columns must be the (Servoy Form) table primary key columns (alphabetically ordered like 'select a_id, b_id,c_id ...')
//-can contain '?' which are replaced with values from the array supplied to parameters argument
// if the sqlstring contains an 'order by' clause, the records will be sorted accordingly and additional constraints apply:
//-must contain 'from' keyword
//-the 'from' must be a comma separated list of table names
//-must at least select from the table used in Servoy Form
//-cannot contain 'group by', 'having' or 'union'
//-all columns must be fully qualified like 'orders.order_id'
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRecord|class=node}{tr:id=name}{td}h6.newRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}newRecord{span}{span:id=iets|style=float: left;}\(\[location\]){span}{td}{tr}{tr:id=des}{td}{sub-section:newRecord_des|text=|trigger=button}{sub-section}{sub-section:newRecord_des|trigger=none|class=sIndent}Create a new record in the form foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:newRecord_snc|text=|trigger=button}{sub-section}{sub-section:newRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:newRecord_prs|text=|trigger=button}{sub-section}{sub-section:newRecord_prs|trigger=none|class=sIndent}\{[Boolean]} \[location\] -- true adds the new record as the topmost record, or adds at specified index
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:newRecord_ret|text=|trigger=button}{sub-section}{sub-section:newRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if succesful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:newRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:newRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:newRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecord_sam|trigger=none}{code:language=javascript}
// foreign key data is only filled in for equals (=) relation items 
forms.customer.controller.newRecord();//default adds on top
//forms.customer.controller.newRecord(false); //adds at bottom
//forms.customer.controller.newRecord(2); //adds as second record
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRecordomitRecord|class=node}{tr:id=name}{td}h6.newRecordomitRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}newRecordomitRecord{span}{span:id=iets|style=float: left;}\(\[location\]){span}{td}{tr}{tr:id=des}{td}{sub-section:newRecordomitRecord_des|text=|trigger=button}{sub-section}{sub-section:newRecordomitRecord_des|trigger=none|class=sIndent}CreateOmit a newcurrent record in the form foundset, to be shown with loadOmittedRecords.

Note: The omitted records are discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invert{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:newRecordomitRecord_snc|text=|trigger=button}{sub-section}{sub-section:newRecordomitRecord_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:newRecordomitRecord_prs|text=|trigger=button}{sub-section}{sub-section:newRecordomitRecord_prs|trigger=none|class=sIndent}\[location\] -- boolean true adds the new record as the topmost record, or adds at specified index
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:newRecordomitRecord_ret|text=|trigger=button}{sub-section}{sub-section:newRecordomitRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if succesfulsuccessful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:newRecordomitRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecordomitRecord_see|trigger=none}[controller.loadOmittedRecords|controller#loadOmittedRecords]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:newRecordomitRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecordomitRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:newRecordomitRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:newRecordomitRecord_sam|trigger=none}{code:language=javascript}
// foreign key data is only filled in for equals (=) relation items var success = forms.customer.controller.newRecordomitRecord();//default
adds on top
//forms.customer.controller.newRecord(false); //adds at bottom
//forms.customer.controller.newRecord(2); //adds as second record
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=omitRecordprint|class=node}{tr:id=name}{td}h6.omitRecordprint{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]void{span}{span:id=iets|style=float: left; font-weight: bold;}omitRecordprint{span}{span:id=iets|style=float: left;}\(left;}\(\[printCurrentRecordOnly\], \[showPrinterSelectDialog\], \[printerJob\]){span}{td}{tr}{tr:id=des}{td}{sub-section:omitRecordprint_des|text=|trigger=button}{sub-section}{sub-section:omitRecordprint_des|trigger=none|class=sIndent}OmitPrint currentthis recordform inwith formcurrent foundset, to be shown with loadOmittedRecords.

Note: The omitted records are discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertwithout preview.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:omitRecordprint_snc|text=|trigger=button}{sub-section}{sub-section:omitRecordprint_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:omitRecordprint_prs|text=|trigger=button}{sub-section}{sub-section:omitRecordprint_prs|trigger=none|class=sIndent}\[printCurrentRecordOnly\] -- to print the current record only
\{[Boolean]} \[showPrinterSelectDialog\] -- to show the printer select dialog (default printer is normally used)
\[printerJob\] -- print to plugin printer job, see pdf printer plugin for example
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:omitRecordprint_ret|text=|trigger=button}{sub-section}{sub-section:omitRecordprint_ret|trigger=none|class=sIndent}[Boolean] -- true if successfulvoid{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:omitRecordprint_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecordprint_see|trigger=none}[controller.loadOmittedRecords|controller#loadOmittedRecords]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:omitRecordprint_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecordprint_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:omitRecordprint_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecordprint_sam|trigger=none}{code:language=javascript}
var success = 
//print this form (with foundset records)
forms.customer.controller.print();
//print only current record (no printerSelectDialog) to pdf plugin printer
//forms.customer.controller.omitRecord()print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=printprintXML|class=node}{tr:id=name}{td}h6.printprintXML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[String]{span}{span:id=iets|style=float: left; font-weight: bold;}printprintXML{span}{span:id=iets|style=float: left;}\(\[printCurrentRecordOnly\], \[showPrinterSelectDialog\], \[printerJob\]){span}{td}{tr}{tr:id=des}{td}{sub-section:printprintXML_des|text=|trigger=button}{sub-section}{sub-section:printprintXML_des|trigger=none|class=sIndent}Print this form with current foundset, without preview records to xml format.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:printprintXML_snc|text=|trigger=button}{sub-section}{sub-section:printprintXML_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:printprintXML_prs|text=|trigger=button}{sub-section}{sub-section:printprintXML_prs|trigger=none|class=sIndent}\[printCurrentRecordOnly\] -- to print the current record only
\[showPrinterSelectDialog\] -- boolean to show the printer select dialog (default printer is normally used)
\[printerJob=none|class=sIndent}\[printCurrentRecordOnly\] -- print to pluginprint printerthe job,current seerecord pdf printer plugin for example
only
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:printprintXML_ret|text=|trigger=button}{sub-section}{sub-section:printprintXML_ret|trigger=none|class=sIndent}void[String] -- the XML{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:printprintXML_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printprintXML_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:printprintXML_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printprintXML_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:printprintXML_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printprintXML_sam|trigger=none}{code:language=javascript}
//printTIP: thissee formalso (with foundset records)plugins.file.writeXMLFile(...)
var xml = forms.customer.controller.printprintXML();
//print only current record (no printerSelectDialog) to pdf plugin printer
//
//var xml = forms.customer.controller.printprintXML(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=printXMLrecreateUI|class=node}{tr:id=name}{td}h6.printXMLrecreateUI{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringBoolean]{span}{span:id=iets|style=float: left; font-weight: bold;}printXMLrecreateUI{span}{span:id=iets|style=float: left;}\(\[printCurrentRecordOnly\]){span}{td}{tr}{tr:id=des}{td}{sub-section:printXMLrecreateUI_des|text=|trigger=button}{sub-section}{sub-section:printXMLrecreateUI_des|trigger=none|class=sIndent}Print this form with current foundset records to xml formatRecreates the forms UI components, to reflect the latest solution model.
Use this after altering the elements via solutionModel at the JSForm of this form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:printXMLrecreateUI_snc|text=|trigger=button}{sub-section}{sub-section:printXMLrecreateUI_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{trbuilder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:printXMLrecreateUI_prs|text=|trigger=button}{sub-section}{sub-section:printXMLrecreateUI_prs|trigger=none|class=sIndent}\[printCurrentRecordOnly\] -- to print the current record only
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:printXMLrecreateUI_ret|text=|trigger=button}{sub-section}{sub-section:printXMLrecreateUI_ret|trigger=none|class=sIndent}[StringBoolean] -- true theif XMLsuccessful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:printXMLrecreateUI_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXMLrecreateUI_see|trigger=none}[.|JSForm]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:printXMLrecreateUI_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXMLrecreateUI_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:printXMLrecreateUI_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXMLrecreateUI_sam|trigger=none}{code:language=javascript}
//TIP: see also plugins.file.writeXMLFile(...)
var xml = forms.customer.controller.printXML();
//print only current record 
//var xml = get the solution model JSForm 
var form = solutionModel.getForm("myForm");
// get the JSField of the form 
var field = form.getField("myField");
// alter the field
field.x = field.x + 10;
// recreate the runtime forms ui to reflect the changes.
forms.customer.controller.printXMLrecreateUI(true);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=recreateUIrelookup|class=node}{tr:id=name}{td}h6.recreateUIrelookup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]void{span}{span:id=iets|style=float: left; font-weight: bold;}recreateUIrelookup{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:recreateUIrelookup_des|text=|trigger=button}{sub-section}{sub-section:recreateUIrelookup_des|trigger=none|class=sIndent}RecreatesPerforms thea forms UI components, to reflectrelookup for the current latestfoundset solutionrecord modeldataproviders.
UseLookups thisare afterdefined alteringin the elements via solutionModel at the JSForm of this formdataprovider (columns) auto\-enter setting and are normally performed over a relation upon record creation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:recreateUIrelookup_snc|text=|trigger=button}{sub-section}{sub-section:recreateUIrelookup_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:recreateUIrelookup_prs|text=|trigger=button}{sub-section}{sub-section:recreateUIrelookup_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:recreateUIrelookup_ret|text=|trigger=button}{sub-section}{sub-section:recreateUIrelookup_ret|trigger=none|class=sIndent}[Boolean] -- true if successfulvoid{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:recreateUIrelookup_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUIrelookup_see|trigger=none}[JSForm.|JSForm]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:recreateUIrelookup_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUIrelookup_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:recreateUIrelookup_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUIrelookup_sam|trigger=none}{code:language=javascript}
// get the solution model JSForm 
var form = solutionModel.getForm("myForm");
// get the JSField of the form 
var field = form.getField("myField");
// alter the field
field.x = field.x + 10;
// recreate the runtime forms ui to reflect the changes.
=javascript}
forms.customer.controller.recreateUIrelookup();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=relookupsearch|class=node}{tr:id=name}{td}h6.relookupsearch{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}relookupsearch{span}{span:id=iets|style=float: left;}\(\[clearLastResults\], \[reduceSearch\]){span}{td}{tr}{tr:id=des}{td}{sub-section:relookupsearch_des|text=|trigger=button}{sub-section}{sub-section:relookupsearch_des|trigger=none|class=sIndent}Performs a relookup for the current foundset record dataproviders.
Lookups are defined in the dataprovider (columns) auto\-enter setting and are normally performed over a relation upon record creationStart the database search and use the results, returns the number of records, make sure you did "find" function first.

Note: Omitted records are automatically excluded when performing a search \- meaning that the foundset result by default will not include omitted records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:relookupsearch_snc|text=|trigger=button}{sub-section}{sub-section:relookupsearch_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:relookupsearch_prs|text=|trigger=button}{sub-section}{sub-section:relookupsearch_prs|trigger=none|class=sIndent}=sIndent}\[clearLastResults\] -- boolean, clear previous search, default true
\[reduceSearch\] -- boolean, reduce (true) or extend (false) previous search results, default true
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:relookupsearch_ret|text=|trigger=button}{sub-section}{sub-section:relookupsearch_ret|trigger=none|class=sIndent}void[Number] -- the recordCount{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:relookupsearch_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookupsearch_see|trigger=none}[.find|JSFoundset#find]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:relookupsearch_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookupsearch_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:relookupsearch_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookupsearch_sam|trigger=none}{code:language=javascript}
var recordCount = forms.customer.controllerfoundset.relookupsearch();
//var recordCount = forms.customer.foundset.search(false,false); //to extend foundset
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=searchsetDataProviderValue|class=node}{tr:id=name}{td}h6.searchsetDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]void{span}{span:id=iets|style=float: left; font-weight: bold;}searchsetDataProviderValue{span}{span:id=iets|style=float: left;}\(\[clearLastResults\]dataprovider, \[reduceSearch\]value){span}{td}{tr}{tr:id=des}{td}{sub-section:searchsetDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:searchsetDataProviderValue_des|trigger=none|class=sIndent}StartSets the databasevalue searchbased and use the results, returns the number of records, make sure you did "find" function first.

Note: Omitted records are automatically excluded when performing a search \- meaning that the foundset result by default will not include omitted recordson a specified dataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:searchsetDataProviderValue_snc|text=|trigger=button}{sub-section}{sub-section:searchsetDataProviderValue_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:searchsetDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:searchsetDataProviderValue_prs|trigger=none|class=sIndent}\{[clearLastResults\String]} dataprovider -- boolean, clear previous search, default true
\[reduceSearch\] -- boolean, reduce (true) or extend (false) previous search results, default true the dataprovider name to set the value for
\{[Object]} value -- the value to set in the dataprovider
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:searchsetDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:searchsetDataProviderValue_ret|trigger=none|class=sIndent}[Number] -- the recordCountvoid{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:searchsetDataProviderValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:searchsetDataProviderValue_see|trigger=none}[controller.find|controller#find]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:searchsetDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:searchsetDataProviderValue_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:searchsetDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:searchsetDataProviderValue_sam|trigger=none}{code:language=javascript}
var
recordCount = forms.customer.controller.search();
//var recordCount = forms.customer.controller.search(false,false); //to extend foundset
setDataProviderValue('contact_name','mycompany');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDataProviderValuesetDesignMode-Boolean|class=node}{tr:id=name}{td}h6.setDataProviderValuesetDesignMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setDataProviderValuesetDesignMode{span}{span:id=iets|style=float: left;}\(dataprovider, valuedesignMode){span}{td}{tr}{tr:id=des}{td}{sub-section:setDataProviderValuesetDesignMode-Boolean_des|text=|trigger=button}{sub-section}{sub-section:setDataProviderValuesetDesignMode-Boolean_des|trigger=none|class=sIndent}Sets the value based on a specified dataprovider name this form in designmode with param true, false will return to normal browse/edit mode.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_snc|text=|trigger=button}{sub-section}{sub-section:setDataProviderValuesetDesignMode-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_prs|text=|trigger=button}{sub-section}{sub-section:setDataProviderValuesetDesignMode-Boolean_prs|trigger=none|class=sIndent}\{[StringBoolean]} dataproviderdesignMode -- thesets dataproviderform namein todesign setmode theif valuetrue, for
\{[Object]} value -- the value to set in the dataprovider
false ends design mode.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_ret|text=|trigger=button}{sub-section}{sub-section:setDataProviderValuesetDesignMode-Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValuesetDesignMode-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValuesetDesignMode-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDataProviderValuesetDesignMode-Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValuesetDesignMode-Boolean_sam|trigger=none}{code:language=javascript}
//Set the current form in designmode with no callbacks
forms.customer.controller.setDataProviderValue('contact_name','mycompany'setDesignMode(true);

//Set the current form out of designmode (to normal browse)
forms.customer.controller.setDesignMode(false);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDesignMode-Function_Function_Function_Function|class=node}{tr:id=name}{td}h6.setDesignMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setDesignMode{span}{span:id=iets|style=float: left;}\(\[ondrag\], \[ondrop\], \[onselect\], \[onresize\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setDesignMode-Function_Function_Function_Function_des|text=|trigger=button}{sub-section}{sub-section:setDesignMode-section:setDesignMode-Function_Function_Function_Function_des|trigger=none|class=sIndent}Sets this form in designmode with param true or one or more callback methods. 
return to normal editmode with first parameter false.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDesignMode-Function_Function_Function_Function_snc|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Function_Function_Function_Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDesignMode-Function_Function_Function_Function_prs|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Function_Function_Function_Function_prs|trigger=none|class=sIndent}\{[Function]} ondrag\] -- boolean to indicate the designmode state or onDrag method reference
\{[Function]} ondrop\] -- onDrop method reference
\{[Function]} onselect\] -- onSelect method reference
\{[Function]} onresize\] -- onResize method reference
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setDesignMode-Function_Function_Function_Function_ret|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Function_Function_Function_Function_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDesignMode-Function_Function_Function_Function_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Function_Function_Function_Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDesignMode-Function_Function_Function_Function_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Function_Function_Function_Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDesignMode-Function_Function_Function_Function_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Function_Function_Function_Function_sam|trigger=none}{code:language=javascript}
//Set the current form in designmode with no callbacks
forms.customer.controller.setDesignMode(true);

code:language=javascript}
//Set the current form in designmode with callbacks
forms.customer.controller.setDesignMode(onDragMethod,onDropMethod,onSelectMethod,onResizeMethod);

//Set the current form out of designmode (to normal browse mode)
forms.customer.controller.setDesignMode(false);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setPageFormat|class=node}{tr:id=name}{td}h6.setPageFormat{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setPageFormat{span}{span:id=iets|style=float: left;}\(width, height, leftmargin, rightmargin, topmargin, bottommargin, \[orientation\], \[units\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setPageFormat_des|text=|trigger=button}{sub-section}{sub-section:setPageFormat_des|trigger=none|class=sIndent}Set the page format to use when printing.

Orientation values:
0 \- Landscape mode
1 \- Portrait mode

Units values:
0 \- millimeters
1 \- inches
2 \- pixels

Note: The unit specified for width, height and all margins MUST be the same.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setPageFormat_snc|text=|trigger=button}{sub-section}{sub-section:setPageFormat_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setPageFormat_prs|text=|trigger=button}{sub-section}{sub-section:setPageFormat_prs|trigger=none|class=sIndent}width -- the specified width of the page to be printed.
height -- the specified height of the page to be printed.
leftmargin -- the specified left margin of the page to be printed.
rightmargin -- the specified right margin of the page to be printed.
topmargin -- the specified top margin of the page to be printed.
bottommargin -- the specified bottom margin of the page to be printed.
\[orientation\] -- the specified orientation of the page to be printed; the default is Portrait mode
\[units\] -- the specified units for the width and height of the page to be printed; the default is pixels
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setPageFormat_ret|text=|trigger=button}{sub-section}{sub-section:setPageFormat_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setPageFormat_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPageFormat_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setPageFormat_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPageFormat_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setPageFormat_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPageFormat_sam|trigger=none}{code:language=javascript}
//Set page format to a custom size of 100x200 pixels with 10 pixel margins on all sides in portrait mode
forms.customer.controller.setPageFormat(100, 200, 10, 10, 10, 10);

//Set page format to a custom size of 100x200 mm in landscape mode
forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, 0, 0);

//Set page format to a custom size of 100x200 inch in portrait mode
forms.customer.controller.setPageFormat(100, 200, 0, 0, 0, 0, 1, 1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setPreferredPrinter|class=node}{tr:id=name}{td}h6.setPreferredPrinter{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setPreferredPrinter{span}{span:id=iets|style=float: left;}\(printerName){span}{td}{tr}{tr:id=des}{td}{sub-section:setPreferredPrinter_des|text=|trigger=button}{sub-section}{sub-section:setPreferredPrinter_des|trigger=none|class=sIndent}Set the preferred printer name to use when printing.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setPreferredPrinter_snc|text=|trigger=button}{sub-section}{sub-section:setPreferredPrinter_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setPreferredPrinter_prs|text=|trigger=button}{sub-section}{sub-section:setPreferredPrinter_prs|trigger=none|class=sIndent}\{[String]} printerName -- The name of the printer to be used when printing.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setPreferredPrinter_ret|text=|trigger=button}{sub-section}{sub-section:setPreferredPrinter_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setPreferredPrinter_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPreferredPrinter_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setPreferredPrinter_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPreferredPrinter_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setPreferredPrinter_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setPreferredPrinter_sam|trigger=none}{code:language=javascript}
forms.customer.controller.setPreferredPrinter('HP Laser 2200');
{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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=setTabSequence|class=node}{tr:id=name}{td}h6.setTabSequence{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setTabSequence{span}{span:id=iets|style=float: left;}\(arrayOfElements){span}{td}{tr}{tr:id=des}{td}{sub-section:setTabSequence_des|text=|trigger=button}{sub-section}{sub-section:setTabSequence_des|trigger=none|class=sIndent}Set the tab order sequence programatically, by passing the elements references in a javascript array.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setTabSequence_snc|text=|trigger=button}{sub-section}{sub-section:setTabSequence_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setTabSequence_prs|text=|trigger=button}{sub-section}{sub-section:setTabSequence_prs|trigger=none|class=sIndent}\{[Object]\[]} arrayOfElements -- array containing the element references
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setTabSequence_ret|text=|trigger=button}{sub-section}{sub-section:setTabSequence_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setTabSequence_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTabSequence_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setTabSequence_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTabSequence_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setTabSequence_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setTabSequence_sam|trigger=none}{code:language=javascript}
forms.customer.controller.setTabSequence([forms.customer.elements.fld_order_id, forms.customer.elements.fld_order_amount]);
{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;}\(\[dialogName/windowNamewindow\], \[modal\]){span}{td}{tr}{tr:id=des}{td}{sub-section:show_des|text=|trigger=button}{sub-section}{sub-section:show_des|trigger=none|class=sIndent}Shows the form (makes the form visible), optionally shownshowing it in the specified dialog (modal or not)/windowJSWindow.
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|text=|trigger=button}{sub-section}{sub-section:show_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:show_prs|text=|trigger=button}{sub-section}{sub-section:show_prs|trigger=none|class=sIndent}\[dialogName/windowNamewindow\] -- the dialog/window name
\[modal\] -- boolean indicating modality for dialogs or null if it should use a window; default value is falsein which this form should be shown. If it is unspecified the current window will be used.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:show_ret|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:show_see|trigger=none}[application.createWindow|Application#createWindow]\\ [application.getWindow|Application#getWindow]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show_link|text=|trigger=button}{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|text=|trigger=button}{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 thecreated named modal dialog 
// 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('mydialog',truew);
//show the form in athe namedmain window
//forms.customer.controller.show('mywindow',null);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showPrintPreview|class=node}{tr:id=name}{td}h6.showPrintPreview{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}showPrintPreview{span}{span:id=iets|style=float: left;}\(\[printCurrentRecordOnly\], \[printerJob\], \[zoomFactor\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showPrintPreview_des|text=|trigger=button}{sub-section}{sub-section:showPrintPreview_des|trigger=none|class=sIndent}Show this form in print preview.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showPrintPreview_snc|text=|trigger=button}{sub-section}{sub-section:showPrintPreview_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showPrintPreview_prs|text=|trigger=button}{sub-section}{sub-section:showPrintPreview_prs|trigger=none|class=sIndent}\[printCurrentRecordOnly\] -- to print the current record only
\[printerJob\] -- print to plugin printer job, see pdf printer plugin for example (incase print is used from printpreview)
\[zoomFactor\] -- a specified number value from 10\-400
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showPrintPreview_ret|text=|trigger=button}{sub-section}{sub-section:showPrintPreview_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showPrintPreview_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showPrintPreview_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showPrintPreview_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showPrintPreview_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showPrintPreview_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showPrintPreview_sam|trigger=none}{code:language=javascript}
//shows this form (with foundset records) in print preview
forms.customer.controller.showPrintPreview();
//to print preview current record only
//forms.customer.controller.showPrintPreview(true);
//to print preview current record only with 125% zoom factor; 
//forms.customer.controller.showPrintPreview(true, null, 125);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showRecords|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;}\(data, \[dialogName/windowNamewindow\], \[modal\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showRecords_des|text=|trigger=button}{sub-section}{sub-section:showRecords_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_snc|text=|trigger=button}{sub-section}{sub-section:showRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showRecords_prs|text=|trigger=button}{sub-section}{sub-section:showRecords_prs|trigger=none|class=sIndent}data -- the foundset/pkdataset/singlenNmbersingleNumber\_pk/UUIDpk to load before showing the form.
\[dialogName/windowNamewindow\] -- the dialog/window name
\[modal\] -- boolean indicating modality for dialogs or null if it should use a window; default value is false
in which this form should be shown.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showRecords_ret|text=|trigger=button}{sub-section}{sub-section:showRecords_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showRecords_see|trigger=none}[application.createWindow|Application#createWindow]\\ [application.getWindow|Application#getWindow]\\ [controller.loadRecords|controller#loadRecords]\\ [controller.show|controller#show]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showRecords_sam|trigger=none}{code:language=javascript}
forms.customer.controller.showRecords(foundset);
// load foundset & show the form in newly thecreated named modal dialog
var 
//w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.showshowRecords(foundset, 'mydialog', truew);
// load foundset & show the form in thean namedexisting window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.showshowRecords(foundset, 'mywindow', nullw);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort|class=node}{tr:id=name}{td}h6.sort{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sort{span}{span:id=iets|style=float: left;}\(sortString, \[defer\]){span}{td}{tr}{tr:id=des}{td}{sub-section:sort_des|text=|trigger=button}{sub-section}{sub-section:sort_des|trigger=none|class=sIndent}Sorts the form foundset based on the given sort string. 
TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sort_snc|text=|trigger=button}{sub-section}{sub-section:sort_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:sort_prs|text=|trigger=button}{sub-section}{sub-section:sort_prs|trigger=none|class=sIndent}sortString -- the specified columns (and sort order)
\[defer\] -- the "sortString" will be just stored, without performing a query on the database (the actual sorting will be deferred until the next data loading action).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:sort_ret|text=|trigger=button}{sub-section}{sub-section:sort_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sort_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sort_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sort_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sort_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sort_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sort_sam|trigger=none}{code:language=javascript}
forms.customer.controller.sort('columnA desc,columnB asc');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sortDialog|class=node}{tr:id=name}{td}h6.sortDialog{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sortDialog{span}{span:id=iets|style=float: left;}\(\[sortString\]){span}{td}{tr}{tr:id=des}{td}{sub-section:sortDialog_des|text=|trigger=button}{sub-section}{sub-section:sortDialog_des|trigger=none|class=sIndent}Show the sort dialog to the user a preselection sortString can be passed, to sort the form foundset.
TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sortDialog_snc|text=|trigger=button}{sub-section}{sub-section:sortDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:sortDialog_prs|text=|trigger=button}{sub-section}{sub-section:sortDialog_prs|trigger=none|class=sIndent}\[sortString\] -- the specified columns (and sort order)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:sortDialog_ret|text=|trigger=button}{sub-section}{sub-section:sortDialog_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sortDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sortDialog_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortDialog_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sortDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortDialog_sam|trigger=none}{code:language=javascript}
forms.customer.controller.sortDialog('columnA desc,columnB asc');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}