Child pages
  • controller

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\ {table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled] Gets or sets the enabled state of a form; also known as "grayed\-out".{td}{tr}{tbody}{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 sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{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]\() Set 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}[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]\(designMode) Sets this form in designmode with param true, false 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]\(\[window\]) Shows the form (makes the form visible), optionally showing it in the specified JSWindow.{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, \[window\]) 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\] -- 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. 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') !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:focusField_snc|text=|trigger=button}{sub-section}{sub-section:focusField_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:focusField_prs|text=|trigger=button}{sub-section}{sub-section:focusField_prs|trigger=none|class=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}{tr:id=ret}{td}*Returns*\\{sub-section:focusField_ret|text=|trigger=button}{sub-section}{sub-section:focusField_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:focusField_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusField_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:focusField_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusField_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:focusField_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. forms.customer.controller.focusField(null, false); } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=focusFirstField|class=node}{tr:id=name}{td}h6.focusFirstField{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}focusFirstField{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:focusFirstField_des|text=|trigger=button}{sub-section}{sub-section:focusFirstField_des|trigger=none|class=sIndent}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:focusFirstField_snc|text=|trigger=button}{sub-section}{sub-section:focusFirstField_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:focusFirstField_prs|text=|trigger=button}{sub-section}{sub-section:focusFirstField_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:focusFirstField_ret|text=|trigger=button}{sub-section}{sub-section:focusFirstField_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:focusFirstField_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstField_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:focusFirstField_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstField_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:focusFirstField_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:focusFirstField_sam|trigger=none}{code:language=javascript} forms.customer.controller.focusFirstField(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderMaxLength|class=node}{tr:id=name}{td}h6.getDataProviderMaxLength{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderMaxLength{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderMaxLength_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLength_des|trigger=none|class=sIndent}Returns the maximum length allowed in the specified dataprovider.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderMaxLength_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLength_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderMaxLength_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLength_prs|trigger=none|class=sIndent}\{[String]} name -- the dataprovider name {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderMaxLength_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderMaxLength_ret|trigger=none|class=sIndent}[Number] -- the length{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderMaxLength_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLength_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderMaxLength_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLength_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderMaxLength_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderMaxLength_sam|trigger=none}{code:language=javascript} forms.customer.controller.getDataProviderMaxLength('name'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderValue|class=node}{tr:id=name}{td}h6.getDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderValue{span}{span:id=iets|style=float: left;}\(dataProvider){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_des|trigger=none|class=sIndent}Gets a value based on the specified dataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderValue_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_prs|trigger=none|class=sIndent}\{[String]} dataProvider -- the dataprovider name to retieve the value for {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_ret|trigger=none|class=sIndent}[Object] -- the dataprovider value (null if unknown dataprovider){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue_sam|trigger=none}{code:language=javascript} var val = forms.customer.controller.getDataProviderValue('contact_name'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSource|class=node}{tr:id=name}{td}h6.getDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSource{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSource_des|text=|trigger=button}{sub-section}{sub-section:getDataSource_des|trigger=none|class=sIndent}Get the used datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSource_snc|text=|trigger=button}{sub-section}{sub-section:getDataSource_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSource_prs|text=|trigger=button}{sub-section}{sub-section:getDataSource_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSource_ret|text=|trigger=button}{sub-section}{sub-section:getDataSource_ret|trigger=none|class=sIndent}[String] -- the datasource{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSource_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSource_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSource_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSource_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSource_sam|trigger=none}{code:language=javascript} var dataSource = forms.customer.controller.getDataSource(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDesignMode|class=node}{tr:id=name}{td}h6.getDesignMode{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}getDesignMode{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDesignMode_des|text=|trigger=button}{sub-section}{sub-section:getDesignMode_des|trigger=none|class=sIndent}Returns the state of this form designmode.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDesignMode_snc|text=|trigger=button}{sub-section}{sub-section:getDesignMode_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:getDesignMode_prs|text=|trigger=button}{sub-section}{sub-section:getDesignMode_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDesignMode_ret|text=|trigger=button}{sub-section}{sub-section:getDesignMode_ret|trigger=none|class=sIndent}[Boolean] -- the design mode state (true/fase){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDesignMode_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignMode_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDesignMode_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignMode_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDesignMode_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDesignMode_sam|trigger=none}{code:language=javascript} var success = forms.customer.controller.getDesignMode(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFormContext|class=node}{tr:id=name}{td}h6.getFormContext{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getFormContext{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getFormContext_des|text=|trigger=button}{sub-section}{sub-section:getFormContext_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:getFormContext_snc|text=|trigger=button}{sub-section}{sub-section:getFormContext_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:getFormContext_prs|text=|trigger=button}{sub-section}{sub-section:getFormContext_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getFormContext_ret|text=|trigger=button}{sub-section}{sub-section:getFormContext_ret|trigger=none|class=sIndent}[JSDataSet] -- the dataset with form context{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFormContext_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContext_see|trigger=none}[.|JSDataSet]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFormContext_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContext_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFormContext_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormContext_sam|trigger=none}{code:language=javascript} var dataset = forms.customer.controller.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=getFormWidth|class=node}{tr:id=name}{td}h6.getFormWidth{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getFormWidth{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getFormWidth_des|text=|trigger=button}{sub-section}{sub-section:getFormWidth_des|trigger=none|class=sIndent}Gets the form width in pixels.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFormWidth_snc|text=|trigger=button}{sub-section}{sub-section:getFormWidth_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:getFormWidth_prs|text=|trigger=button}{sub-section}{sub-section:getFormWidth_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getFormWidth_ret|text=|trigger=button}{sub-section}{sub-section:getFormWidth_ret|trigger=none|class=sIndent}[Number] -- the width in pixels{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFormWidth_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidth_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFormWidth_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidth_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFormWidth_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFormWidth_sam|trigger=none}{code:language=javascript} var width = forms.customer.controller.getFormWidth(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMaxRecordIndex|class=node}{tr:id=name}{td}h6.getMaxRecordIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMaxRecordIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getMaxRecordIndex_des|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndex_des|trigger=none|class=sIndent}Returns 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(...){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMaxRecordIndex_snc|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndex_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:getMaxRecordIndex_prs|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMaxRecordIndex_ret|text=|trigger=button}{sub-section}{sub-section:getMaxRecordIndex_ret|trigger=none|class=sIndent}[Number] -- the max record index{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMaxRecordIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndex_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:getMaxRecordIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMaxRecordIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMaxRecordIndex_sam|trigger=none}{code:language=javascript} for ( var i = 1 ; i <= forms.customer.controller.getMaxRecordIndex() ; i++ ) { 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=getName|class=node}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getName_des|text=|trigger=button}{sub-section}{sub-section:getName_des|trigger=none|class=sIndent}Get the name of this form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getName_snc|text=|trigger=button}{sub-section}{sub-section:getName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getName_prs|text=|trigger=button}{sub-section}{sub-section:getName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getName_ret|text=|trigger=button}{sub-section}{sub-section:getName_ret|trigger=none|class=sIndent}[String] -- the name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getName_sam|trigger=none}{code:language=javascript} var formName = forms.customer.controller.getName(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPartHeight|class=node}{tr:id=name}{td}h6.getPartHeight{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getPartHeight{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getPartHeight_des|text=|trigger=button}{sub-section}{sub-section:getPartHeight_des|trigger=none|class=sIndent}Gets the part height in pixels.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPartHeight_snc|text=|trigger=button}{sub-section}{sub-section:getPartHeight_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getPartHeight_prs|text=|trigger=button}{sub-section}{sub-section:getPartHeight_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose height will be returned. {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getPartHeight_ret|text=|trigger=button}{sub-section}{sub-section:getPartHeight_ret|trigger=none|class=sIndent}[Number] -- the part height in pixels{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPartHeight_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeight_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPartHeight_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeight_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPartHeight_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartHeight_sam|trigger=none}{code:language=javascript} var height = forms.customer.controller.getPartHeight(JSPart.BODY); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPartYOffset|class=node}{tr:id=name}{td}h6.getPartYOffset{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getPartYOffset{span}{span:id=iets|style=float: left;}\(partType){span}{td}{tr}{tr:id=des}{td}{sub-section:getPartYOffset_des|text=|trigger=button}{sub-section}{sub-section:getPartYOffset_des|trigger=none|class=sIndent}Returns the Y offset of a given part of the form.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPartYOffset_snc|text=|trigger=button}{sub-section}{sub-section:getPartYOffset_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getPartYOffset_prs|text=|trigger=button}{sub-section}{sub-section:getPartYOffset_prs|trigger=none|class=sIndent}\{[Number]} partType -- The type of the part whose Y offset will be returned. {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getPartYOffset_ret|text=|trigger=button}{sub-section}{sub-section:getPartYOffset_ret|trigger=none|class=sIndent}[Number] -- A number holding the Y offset of the specified form part.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPartYOffset_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffset_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPartYOffset_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffset_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPartYOffset_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getPartYOffset_sam|trigger=none}{code:language=javascript} var offset = forms.customer.controller.getPartYOffset(JSPart.BODY); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSelectedIndex|class=node}{tr:id=name}{td}h6.getSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getSelectedIndex_des|text=|trigger=button}{sub-section}{sub-section:getSelectedIndex_des|trigger=none|class=sIndent}Gets the current record index of the current foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSelectedIndex_snc|text=|trigger=button}{sub-section}{sub-section:getSelectedIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSelectedIndex_prs|text=|trigger=button}{sub-section}{sub-section:getSelectedIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSelectedIndex_ret|text=|trigger=button}{sub-section}{sub-section:getSelectedIndex_ret|trigger=none|class=sIndent}[Number] -- the index{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSelectedIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSelectedIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSelectedIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_sam|trigger=none}{code:language=javascript} //gets the current record index in the current foundset var current = forms.customer.controller.getSelectedIndex(); //sets the next record in the foundset, will be reflected in UI forms.customer.controller.setSelectedIndex(current+1); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTabSequence|class=node}{tr:id=name}{td}h6.getTabSequence{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTabSequence{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getTabSequence_des|text=|trigger=button}{sub-section}{sub-section:getTabSequence_des|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=snc}{td}*Since*\\{sub-section:getTabSequence_snc|text=|trigger=button}{sub-section}{sub-section:getTabSequence_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:getTabSequence_prs|text=|trigger=button}{sub-section}{sub-section:getTabSequence_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getTabSequence_ret|text=|trigger=button}{sub-section}{sub-section:getTabSequence_ret|trigger=none|class=sIndent}[String]\[] -- array of names{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTabSequence_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTabSequence_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{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}{tr:id=sam}{td}*Sample*\\{sub-section:getTabSequence_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{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.focusField(null, false); } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getWindow|class=node}{tr:id=name}{td}h6.getWindow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSWindow]{span}{span:id=iets|style=float: left; font-weight: bold;}getWindow{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getWindow_des|text=|trigger=button}{sub-section}{sub-section:getWindow_des|trigger=none|class=sIndent}Returns 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:getWindow_snc|text=|trigger=button}{sub-section}{sub-section:getWindow_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:getWindow_prs|text=|trigger=button}{sub-section}{sub-section:getWindow_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getWindow_ret|text=|trigger=button}{sub-section}{sub-section:getWindow_ret|trigger=none|class=sIndent}[JSWindow] -- 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=see}{td}*Also see*\\{sub-section:getWindow_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getWindow_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getWindow_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getWindow_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getWindow_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getWindow_sam|trigger=none}{code:language=javascript} 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=invertRecords|class=node}{tr:id=name}{td}h6.invertRecords{td}{tr}{tr:id=sig}{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}{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=prs}{td}*Parameters*\\{sub-section:invertRecords_prs|text=|trigger=button}{sub-section}{sub-section:invertRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:invertRecords_ret|text=|trigger=button}{sub-section}{sub-section:invertRecords_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:invertRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:invertRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:invertRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:invertRecords_sam|trigger=none}{code:language=javascript} forms.customer.controller.invertRecords(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=loadAllRecords|class=node}{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;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:loadAllRecords_des|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 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:id=ret}{td}*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=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}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:loadOmittedRecords_ret|text=|trigger=button}{sub-section}{sub-section:loadOmittedRecords_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: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=link}{td}*External links*\\{sub-section:loadOmittedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:loadOmittedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:loadOmittedRecords_sam|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\]){span}{td}{tr}{tr:id=des}{td}{sub-section:loadRecords_des|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}[.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=omitRecord|class=node}{tr:id=name}{td}h6.omitRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}omitRecord{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:omitRecord_des|text=|trigger=button}{sub-section}{sub-section:omitRecord_des|trigger=none|class=sIndent}Omit current record in 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:omitRecord_snc|text=|trigger=button}{sub-section}{sub-section:omitRecord_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:omitRecord_prs|text=|trigger=button}{sub-section}{sub-section:omitRecord_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:omitRecord_ret|text=|trigger=button}{sub-section}{sub-section:omitRecord_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:omitRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecord_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:omitRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:omitRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:omitRecord_sam|trigger=none}{code:language=javascript} var success = forms.customer.controller.omitRecord(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=print|class=node}{tr:id=name}{td}h6.print{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}print{span}{span:id=iets|style=float: left;}\(\[printCurrentRecordOnly\], \[showPrinterSelectDialog\], \[printerJob\]){span}{td}{tr}{tr:id=des}{td}{sub-section:print_des|text=|trigger=button}{sub-section}{sub-section:print_des|trigger=none|class=sIndent}Print this form with current foundset, without preview.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:print_snc|text=|trigger=button}{sub-section}{sub-section:print_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:print_prs|text=|trigger=button}{sub-section}{sub-section:print_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}{tr:id=ret}{td}*Returns*\\{sub-section:print_ret|text=|trigger=button}{sub-section}{sub-section:print_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:print_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:print_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:print_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:print_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:print_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:print_sam|trigger=none}{code:language=javascript} //print this form (with foundset records) forms.customer.controller.print(); //print only current record (no printerSelectDialog) to pdf plugin printer //forms.customer.controller.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=printXML|class=node}{tr:id=name}{td}h6.printXML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}printXML{span}{span:id=iets|style=float: left;}\(\[printCurrentRecordOnly\]){span}{td}{tr}{tr:id=des}{td}{sub-section:printXML_des|text=|trigger=button}{sub-section}{sub-section:printXML_des|trigger=none|class=sIndent}Print this form with current foundset records to xml format.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:printXML_snc|text=|trigger=button}{sub-section}{sub-section:printXML_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:printXML_prs|text=|trigger=button}{sub-section}{sub-section:printXML_prs|trigger=none|class=sIndent}\[printCurrentRecordOnly\] -- to print the current record only {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:printXML_ret|text=|trigger=button}{sub-section}{sub-section:printXML_ret|trigger=none|class=sIndent}[String] -- the XML{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:printXML_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXML_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:printXML_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXML_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:printXML_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:printXML_sam|trigger=none}{code:language=javascript} //TIP: see also plugins.file.writeXMLFile(...) var xml = forms.customer.controller.printXML(); //print only current record //var xml = forms.customer.controller.printXML(true); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=recreateUI|class=node}{tr:id=name}{td}h6.recreateUI{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}recreateUI{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:recreateUI_des|text=|trigger=button}{sub-section}{sub-section:recreateUI_des|trigger=none|class=sIndent}Recreates 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:recreateUI_snc|text=|trigger=button}{sub-section}{sub-section:recreateUI_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:recreateUI_prs|text=|trigger=button}{sub-section}{sub-section:recreateUI_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:recreateUI_ret|text=|trigger=button}{sub-section}{sub-section:recreateUI_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:recreateUI_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUI_see|trigger=none}[.|JSForm]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:recreateUI_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUI_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:recreateUI_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recreateUI_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. forms.customer.controller.recreateUI(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=relookup|class=node}{tr:id=name}{td}h6.relookup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}relookup{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:relookup_des|text=|trigger=button}{sub-section}{sub-section:relookup_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 creation.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:relookup_snc|text=|trigger=button}{sub-section}{sub-section:relookup_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:relookup_prs|text=|trigger=button}{sub-section}{sub-section:relookup_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:relookup_ret|text=|trigger=button}{sub-section}{sub-section:relookup_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:relookup_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookup_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:relookup_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookup_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:relookup_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relookup_sam|trigger=none}{code:language=javascript} forms.customer.controller.relookup(); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=search|class=node}{tr:id=name}{td}h6.search{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}search{span}{span:id=iets|style=float: left;}\(\[clearLastResults\], \[reduceSearch\]){span}{td}{tr}{tr:id=des}{td}{sub-section:search_des|text=|trigger=button}{sub-section}{sub-section:search_des|trigger=none|class=sIndent}Start 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:search_snc|text=|trigger=button}{sub-section}{sub-section:search_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:search_prs|text=|trigger=button}{sub-section}{sub-section:search_prs|trigger=none|class=sIndent}\[clearLastResults\] -- boolean, clear previous search, default true \[reduceSearch\] -- boolean, reduce (true) or extend (false) previous search results, default true {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:search_ret|text=|trigger=button}{sub-section}{sub-section:search_ret|trigger=none|class=sIndent}[Number] -- the recordCount{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:search_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:search_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:search_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:search_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:search_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:search_sam|trigger=none}{code:language=javascript} var recordCount = forms.customer.foundset.search(); //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=setDataProviderValue|class=node}{tr:id=name}{td}h6.setDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setDataProviderValue{span}{span:id=iets|style=float: left;}\(dataprovider, value){span}{td}{tr}{tr:id=des}{td}{sub-section:setDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue_des|trigger=none|class=sIndent}Sets the value based on a specified dataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDataProviderValue_snc|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue_prs|trigger=none|class=sIndent}\{[String]} dataprovider -- 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:setDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDataProviderValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue_sam|trigger=none}{code:language=javascript} forms.customer.controller.setDataProviderValue('contact_name','mycompany'); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDesignMode-Boolean|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;}\(designMode){span}{td}{tr}{tr:id=des}{td}{sub-section:setDesignMode-Boolean_des|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Boolean_des|trigger=none|class=sIndent}Sets 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:setDesignMode-Boolean_snc|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDesignMode-Boolean_prs|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} designMode -- sets form in design mode if true, false ends design mode. {sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setDesignMode-Boolean_ret|text=|trigger=button}{sub-section}{sub-section:setDesignMode-Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDesignMode-Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDesignMode-Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDesignMode-Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDesignMode-Boolean_sam|trigger=none}{code:language=javascript} //Set the current form in designmode with no callbacks forms.customer.controller.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-Function_Function_Function_Function_des|trigger=none|class=sIndent}Sets this form in designmode with one or more callback methods.{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 -- 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 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;}\(\[window\]){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 showing it in the specified JSWindow. 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}\[window\] -- the window in 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 created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.show(w); // show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.show(w); //show the form in the main window //forms.customer.controller.show(null); {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=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, \[window\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showRecords_des|text=|trigger=button}{sub-section}{sub-section:showRecords_des|trigger=none|class=sIndent}
Wiki Markup
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryGets or sets the enabled state of a form; also known as "grayed-out".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.Get/Set the current type of view of this form.

servoy sSummary12%30%58%height: 30px;3Methods SummarySet the foundset in find mode.Sets focus to a field specified by its name.Sets focus to the first field of the form; based on tab order sequence.Returns the maximum length allowed in the specified dataprovider.Gets a value based on the specified dataprovider name.Get the used datasource.Returns the state of this form designmode.Get the design-time properties of the form.Get a design-time property of a form.Gets the forms context where it resides, returns a dataset of its structure to the main controller.Gets the form width in pixels.Get the name of this form.Gets the part height in pixels.Returns the Y offset of a given part of the form.Gets the current record index of the current foundset.Get an array with the names of the components that are part of the tab sequence.Returns the JSWindow that the form is shown in, or null if the form is not currently showing in a window.Loads a (related) foundset into the form.Loads a (related) foundset into the form.voidPrint this form with current foundset, without preview.voidPrint this form with current foundset, without preview.voidPrint this form with current foundset, without preview.voidPrint this form with current foundset, without preview.Print this form with current foundset records to xml format.Print this form with current foundset records to xml format.Recreates the forms UI components, to reflect the latest solution model.Start the database search and use the results, returns the number of records, make sure you did "find" function first.Start the database search and use the results, returns the number of records, make sure you did "find" function first.Start the database search and use the results, returns the number of records, make sure you did "find" function first.voidSets the value based on a specified dataprovider name.voidSets this form in designmode with param true, false will return to normal browse/edit mode.voidSets this form in designmode with one or more callback methods.voidSets this form in designmode with one or more callback methods.voidSets this form in designmode with one or more callback methods.voidSets this form in designmode with one or more callback methods.voidSets this form in designmode with one or more callback methods.voidSets this form in designmode with one or more callback methods.voidSet the page format to use when printing.voidSet the page format to use when printing.voidSet the page format to use when printing.voidSet the preferred printer name to use when printing.voidSets the current record index of the current foundset.voidSet the tab order sequence programatically, by passing the elements references in a javascript array.voidShows the form (makes the form visible) This function does not affect the form foundset in any way.voidShows the form (makes the form visible) This function does not affect the form foundset in any way.voidShows the form (makes the form visible) This function does not affect the form foundset in any way.voidShow this form in print preview.voidShow this form in print preview.voidShow this form in print preview.voidShow this form in print preview.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidLoad data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.voidShow the sort dialog to the user a preselection sortString can be passed, to sort the form foundset.void

propertyservoy sDetail2100%height:30px2Property Detailsenabledname

enabled

dessIndent
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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowreadOnlyname

readOnly

dessIndent
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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
viewname

view

dessIndent
Get/Set the current type of view of this form. Can be one of the JSForm.xxxx_VIEW constants.
In NGClient only RECORD_VIEW is fully supported, the List and TableViews should be replaced by components.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods Detailsfindname

find()

dessIndent
Set the foundset in find mode. (Start a find request), use the "search" function to perform/exit the find.

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')
      !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 '%')
      \_      (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]"
ret

Returns

sIndent true if the foundset is now in find mode, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowfocusFieldname

focusField(fieldName, skipReadonly)

dessIndent
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).
prs

Parameters

sIndentfieldNamethe name of the field to be focussedskipReadonlyindication to skip read only fields, if the named field happens to be read only
ret

Returns

sIndent true if component was found and can be focused
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
focusFirstFieldname

focusFirstField()

dessIndent
Sets focus to the first field of the form; based on tab order sequence.
ret

Returns

sIndent true if component was found and can be focused
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataProviderMaxLengthname

getDataProviderMaxLength(name)

dessIndent
Returns the maximum length allowed in the specified dataprovider.
prs

Parameters

sIndentnamethe dataprovider name
ret

Returns

sIndent the length
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataProviderValuename

getDataProviderValue(dataProvider)

dessIndent
Gets a value based on the specified dataprovider name.
prs

Parameters

sIndentdataProviderthe dataprovider name to retieve the value for
ret

Returns

sIndent the dataprovider value (null if unknown dataprovider)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcename

getDataSource()

dessIndent
Get the used datasource.
ret

Returns

sIndent the datasource
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getDesignModename

getDesignMode()

dessIndent
Returns the state of this form designmode.
ret

Returns

sIndent the design mode state (true/fase)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDesignPropertiesname

getDesignProperties()

dessIndent
Get the design-time properties of the form.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDesignTimePropertyname

getDesignTimeProperty(key)

dessIndent
Get a design-time property of a form.
prs

Parameters

sIndentkeythe property name
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getFormContextname

getFormContext()

dessIndent
Gets the forms context where it resides, returns a dataset of its structure to the main controller.
Note1: can't be called in onload, because no context is yet available at this time.
Note2: tabindex is 1 (left) or 2 (right) for a SplitPane and 0 based for the other tabpanels; tabindex1based is the same as tabindex but is 1 based.
ret

Returns

sIndent the dataset with form context
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getFormWidthname

getFormWidth()

dessIndent
Gets the form width in pixels.
ret

Returns

sIndent the width in pixels
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getNamename

getName()

dessIndent
Get the name of this form.
ret

Returns

sIndent the name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getPartHeightname

getPartHeight(partType)

dessIndent
Gets the part height in pixels.
prs

Parameters

sIndentpartTypeThe type of the part whose height will be returned.
ret

Returns

sIndent the part height in pixels
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getPartYOffsetname

getPartYOffset(partType)

dessIndent
Returns the Y offset of a given part of the form.
prs

Parameters

sIndentpartTypeThe type of the part whose Y offset will be returned.
ret

Returns

sIndent A number holding the Y offset of the specified form part.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSelectedIndexname

getSelectedIndex()

dessIndent
Gets the current record index of the current foundset.
ret

Returns

sIndent the index
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getTabSequencename

getTabSequence()

dessIndent
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.
ret

Returns

sIndent array of names
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getWindowname

getWindow()

dessIndent
Returns the JSWindow that the form is shown in, or null if the form is not currently showing in a window.
ret

Returns

sIndent the JSWindow that the form is shown in, or null if the form is not currently showing in a window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(foundset)

dessIndent
Loads 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.

This will really change the foundset instance itself of the form, so no existing foundset is altered just the new foundset that is given is used..
This is different then doing foundset.loadRecords(foundset) because that just alters the current foundset and doesn't do anything with the foundset that is given.

So controller.loadRecords(fs) does overwrite the foundset instance completely, foundset filters set previously on the forms foundset are gone, only the foundset filters on the given foundset are set.

foundset.loadRecords(fs) will adjust the current forms foundset and the foundset filters that are set are kept and merged with the filters of the given foundset.
prs

Parameters

sIndentfoundsetto load
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(foundset)

dessIndent
Loads 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.

This will really update the foundset instance itself of the form, so now existing foundset is altered just the new foundset is shown.
This is different then doing foundset.loadRecords(foundset) because that just alters the current foundset and doesn't do anything with the foundset
that is given.

When the form uses a seperate foundset, foundset filter params are copied over from the source foundset and are merged with the existing filters.
prs

Parameters

sIndentfoundsetto load
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
printname

print()

dessIndent
Print this form with current foundset, without preview.
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
printname

print(printCurrentRecordOnly)

dessIndent
Print this form with current foundset, without preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record only
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
printname

print(printCurrentRecordOnly, showPrinterSelectDialog)

dessIndent
Print this form with current foundset, without preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record onlyshowPrinterSelectDialogto show the printer select dialog (default printer is normally used)
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
printname

print(printCurrentRecordOnly, showPrinterSelectDialog, printerJob)

dessIndent
Print this form with current foundset, without preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record onlyshowPrinterSelectDialogto show the printer select dialog (default printer is normally used)printerJobprint to plugin printer job, see pdf printer plugin for example
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
printXMLname

printXML()

dessIndent
Print this form with current foundset records to xml format.
ret

Returns

sIndent the XML
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
printXMLname

printXML(printCurrentRecordOnly)

dessIndent
Print this form with current foundset records to xml format.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record only
ret

Returns

sIndent the XML
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
recreateUIname

recreateUI()

dessIndent
Recreates the forms UI components, to reflect the latest solution model.
Use this after altering the elements via solutionModel at the JSForm of this form.
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search()

dessIndent
Start the database search and use the results, returns the number of records, make sure you did "find" function first.
Clear results from previous searches.

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search(clearLastResults)

dessIndent
Start the database search and use the results, returns the number of records, make sure you did "find" function first.
Reduce results from previous searches.

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.
prs

Parameters

sIndentclearLastResultsboolean, clear previous search, default true
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search(clearLastResults, reduceSearch)

dessIndent
Start 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.
prs

Parameters

sIndentclearLastResultsboolean, clear previous search, default truereduceSearchboolean, reduce (true) or extend (false) previous search results, default true
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDataProviderValuename

setDataProviderValue(dataprovider, value)

dessIndent
Sets the value based on a specified dataprovider name.
prs

Parameters

sIndentdataproviderthe dataprovider name to set the value forvaluethe value to set in the dataprovider
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(designMode)

dessIndent
Sets this form in designmode with param true, false will return to normal browse/edit mode.
prs

Parameters

sIndentdesignModesets form in design mode if true, false ends design mode.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag, ondrop)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method referenceondroponDrop method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag, ondrop, onselect)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method referenceondroponDrop method referenceonselectonSelect method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag, ondrop, onselect, onresize)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method referenceondroponDrop method referenceonselectonSelect method referenceonresizeonResize method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag, ondrop, onselect, onresize, ondblclick)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method referenceondroponDrop method referenceonselectonSelect method referenceonresizeonResize method referenceondblclickonDblClick method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDesignModename

setDesignMode(ondrag, ondrop, onselect, onresize, ondblclick, onrightclick)

dessIndent
Sets this form in designmode with one or more callback methods.
prs

Parameters

sIndentondragonDrag method referenceondroponDrop method referenceonselectonSelect method referenceonresizeonResize method referenceondblclickonDblClick method referenceonrightclickonRightClick method reference
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setPageFormatname

setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin)

dessIndent
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.
prs

Parameters

sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setPageFormatname

setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation)

dessIndent
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.
prs

Parameters

sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.orientationthe specified orientation of the page to be printed; the default is Portrait mode
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setPageFormatname

setPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin, orientation, units)

dessIndent
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.
prs

Parameters

sIndentwidththe specified width of the page to be printed.heightthe specified height of the page to be printed.leftmarginthe specified left margin of the page to be printed.rightmarginthe specified right margin of the page to be printed.topmarginthe specified top margin of the page to be printed.bottommarginthe specified bottom margin of the page to be printed.orientationthe specified orientation of the page to be printed; the default is Portrait modeunitsthe specified units for the width and height of the page to be printed; the default is pixels
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setPreferredPrintername

setPreferredPrinter(printerName)

dessIndent
Set the preferred printer name to use when printing.
prs

Parameters

sIndentprinterNameThe name of the printer to be used when printing.
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setSelectedIndexname

setSelectedIndex(index)

dessIndent
Sets the current record index of the current foundset.
prs

Parameters

sIndentindexthe index to select
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
setTabSequencename

setTabSequence(arrayOfElements)

dessIndent
Set the tab order sequence programatically, by passing the elements references in a javascript array.
prs

Parameters

sIndentarrayOfElementsarray containing the element references
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showname

show()

dessIndent
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
showname

show(window)

dessIndent
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
prs

Parameters

sIndentwindowthe window in which this form should be shown, given as a window object
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showname

show(window)

dessIndent
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
prs

Parameters

sIndentwindowthe window in which this form should be shown, specified by the name of an existing window
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showPrintPreviewname

showPrintPreview()

dessIndent
Show this form in print preview.
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
showPrintPreviewname

showPrintPreview(printCurrentRecordOnly)

dessIndent
Show this form in print preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record only
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
showPrintPreviewname

showPrintPreview(printCurrentRecordOnly, printerJob)

dessIndent
Show this form in print preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record onlyprinterJobprint to plugin printer job, see pdf printer plugin for example (incase print is used from printpreview)
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
showPrintPreviewname

showPrintPreview(printCurrentRecordOnly, printerJob, zoomFactor)

dessIndent
Show this form in print preview.
prs

Parameters

sIndentprintCurrentRecordOnlyto print the current record onlyprinterJobprint to plugin printer job, see pdf printer plugin for example (incase print is used from printpreview)zoomFactora specified number value from 10-400
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(foundset)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentfoundsetthe foundset to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(foundset, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentfoundsetthe foundset to load before showing the form.windowthe window in which this form should be shown, given as a window object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(foundset, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentfoundsetthe foundset to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(pkdataset)

dessIndent
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/singleNumber\_pk/UUIDpk to load before showing the form. \[window\] -- the window 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 created named modal dialog var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG); forms.customer.controller.showRecords(foundset, w); // load foundset & show the form in an existing window/dialog var w = application.getWindow("mydialog"); // use null name for main app. window forms.customer.controller.showRecords(foundset, w); {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}
prs

Parameters

sIndentpkdatasetthe pkdataset to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowshowRecordsname

showRecords(pkdataset, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentpkdatasetthe pkdataset to load before showing the form.windowthe window in which this form should be shown, given as a window object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(pkdataset, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentpkdatasetthe pkdataset to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.windowthe window in which this form should be shown, given as a window object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(UUIDpk)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentUUIDpkthe UUIDpk to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(UUIDpk, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentUUIDpkthe UUIDpk to load before showing the form.windowthe window in which this form should be shown, given as a window object.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(UUIDpk, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentUUIDpkthe UUIDpk to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(singleNumber_pk)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentsingleNumber_pkthe singleNumber_pk to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(singleNumber_pk, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentsingleNumber_pkthe singleNumber_pk to load before showing the form.windowthe window in which this form should be shown, given as a window object
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(singleNumber_pk, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentsingleNumber_pkthe singleNumber_pk to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.windowthe window in which this form should be shown, given as a window object
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, argumentsArray)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.argumentsArraythe array of arguments for the query
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, argumentsArray, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.argumentsArraythe array of arguments for the querywindowthe window in which this form should be shown, given as a window object
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, argumentsArray, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.argumentsArraythe array of arguments for the querywindowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showRecordsname

showRecords(query, window)

dessIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
prs

Parameters

sIndentquerythe query to load before showing the form.windowthe window in which this form should be shown, specified by the name of an existing window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortDialogname

sortDialog()

dessIndent
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.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortDialogname

sortDialog(sortString)

dessIndentprs

Parameters

sIndentsortStringthe specified columns (and sort order)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow