Child pages
  • JSFoundSet

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}A JSFoundset is a scriptable object, it contains record objects defined by its SQL. It does lazy load the PKs and records.
Each foundset has its own record set and selected index{sub-section}\\ 

{table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property SummarySummery{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#multiSelect]
Get or set the multiSelect flag of the foundset.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method SummarySummery{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#addFoundSetFilterParam]\(dataprovider, operator, value)
{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addFoundSetFilterParam]\(dataprovider, operator, value, \[name])
Add a filter parameter that is permanent per user session to limit a specified foundset of records.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#clear]\()
Clear the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteAllRecords]\()
Delete all records in foundset, resulting in empty foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteRecord]\(\[index/record])
Delete current/parameter record or the record under the given index.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundset]{td}{td}[#duplicateFoundSet]\()
Get a duplicate of the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#duplicateRecord]\(\[index], \[location], \[changeSelection])
Duplicate current record or record at index in the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#find]\()
Set the foundset in find mode.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getCurrentSort]\()
Get the current sort columns.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getDataProviderValue]\(dataProviderID)
Get a value based on a dataprovider name.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDataSource]\()
Get the datasource used.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]\[]{td}{td}[#getFoundSetFilterParams]\()
{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]\[]{td}{td}[#getFoundSetFilterParams]\(\[filterName])
Get the list of previously defined foundset filters.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]{td}{td}[#getRecord]\(index)
Get the record object at the index.{td}{tr}{tbody}{tbody}{tr}{td}[StringNumber]{td}{td}[#getRelationName#getRecordIndex]\(record)
GetsGet the relation name (null if not a related foundset)record index.{td}{tr}{tbody}{tbody}{tr}{td}[NumberString]{td}{td}[#getSelectedIndex#getRelationName]\()
GetGets the currentrelation recordname index (null if not a related foundset).{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getSelectedIndex]\()
Get the current record index of the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Number]\[\]{td}{td}[#getSelectedIndexes]\()
Get the selected records indexes.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]{td}{td}[#getSelectedRecord]\()
Get the selected record.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]\[\]{td}{td}[#getSelectedRecords]\()
Get the selected records.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getSize]\()
Get the number of records in this foundset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#invertRecords]\()
Invert the foundset against all rows of the current table.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isInFind]\()
Check if this foundset is in find mode.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadAllRecords]\()
Loads all accessible records from the datasource into the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadOmittedRecords]\()
Loads the records that are currently omitted as a foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#loadRecords]\(\[input], \[queryArgumentsArray])
Load records with primary key (dataset/number/uuid) or query.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#newRecord]\(\[location], \[changeSelection])
Create a new record in the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#omitRecord]\(\[index])
Omit current record or the record under the given index, to be shown with loadOmittedRecords.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#relookup]\(\[index])
Perform a relookup for the current record or the record under the given index
Lookups are defined in the dataprovider (columns) auto\-enter setting and are normally performed over a relation upon record creation.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeFoundSetFilterParam]\(name)
Remove a named foundset filter.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#search]\(\[clearLastResults], \[reduceSearch])
Perform a search and show the results.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#selectRecord]\(pkid1, \[pkid2], \[pkidn])
Select the record based on pk data.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDataProviderValue]\(dataProviderID, value)
Set a value based on a dataprovider name.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setSelectedIndex]\(index)
Set the current record index.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setSelectedIndexes]\(indexes)
Set the selected records indexes.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sort]\(sortString, \[defer])
Sorts the foundset based on the given sort string.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundset]{td}{td}[#unrelate]\()
Create a new unrelated foundset that is a copy of the current 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=B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect|class=node}{tr:id=name}{td}
h6. multiSelect{td}{tr}{tr:id=des}{td}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_des|text=|trigger=button}{sub-section}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_des|trigger=none|class=sIndent}Get or set the multiSelect flag of the foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8_prsmultiSelect_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8_prs|trigger=nonemultiSelect_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:multiSelect_prs|text=|trigger=button}{sub-section}{sub-section:multiSelect_prs|trigger=none|class=sIndent}{divsub-section}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_ret|text=|trigger=button}{sub-section}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8_seemultiSelect_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B114475C-1210-4FD5-AEFC-BEB5C07CECA8multiSelect_sam|class=sIndent|trigger=none}{code:language=javascript}
// allow user to select multiple rows.
forms.customer.foundset.multiSelect = true;
{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=1EE954CB-68B8-4D45-9A5C-963EB8371298=addFoundSetFilterParam|class=node}{tr:id=name}{td}
h6. addFoundSetFilterParam{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addFoundSetFilterParam{span}{span:id=iets|style=float: left;}\(dataprovider, operator, value, \[name]){span}{td}{tr}{tr:id=des}{td}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_des|text=|trigger=button}{sub-section}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_des|trigger=none|class=sIndent}Add a filter parameter that is permanent per user session to limit a specified foundset of records.
Use clear() or loadAllRecords() to make the filter effective.
When given a name, the filter can be removed again using removeFoundSetFilterParam(name).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298_prsaddFoundSetFilterParam_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298_prsaddFoundSetFilterParam_snc|trigger=none|class=sIndent}dataprovider --Replace Stringwith column to filter on.
operator -- String operator: version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addFoundSetFilterParam_prs|text=|trigger=button}{sub-section}{sub-section:addFoundSetFilterParam_prs|trigger=none|class=sIndent}\{[String]} dataprovider -- String column to filter on.
\{[String]} operator -- String operator: =, <, >, >=, <=, !=, LIKE, or IN.
\{[Object]} value -- Object filter value.
\{[String]} \[name\] -- String name, can be used to remove the filter again.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_ret|text=|trigger=button}{sub-section}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_ret|trigger=none|class=sIndent}[Boolean] -- true if adding the filter succeeded, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298_seeaddFoundSetFilterParam_link|text=|trigger=button}{sub-section}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298div:class=sIndent}{sub-section:addFoundSetFilterParam_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1EE954CB-68B8-4D45-9A5C-963EB8371298addFoundSetFilterParam_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = forms.customer.foundset.addFoundSetFilterParam('customerid', '=', 'BLONP', 'custFilter');//possible to add multiple
forms.customer.foundset.loadAllRecords();//to make param(s) effective
// Named filters can be removed using forms.customer.foundset.removeFoundSetFilterParam(filterName)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F4805944-4A58-4380-9F8C-E5BCE15D319Dclear|class=node}{tr:id=name}{td}
h6. clear{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}clear{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_des|text=|trigger=button}{sub-section}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_des|trigger=none|class=sIndent}Clear the foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319D_prsclear_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319D_prsclear_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}{*}ReturnsParameters*
\\ {sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319D_retclear_prs|text=|trigger=button}{sub-section}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:clear_ret|text=|trigger=button}{sub-section}{sub-section:clear_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319D_seeclear_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F4805944-4A58-4380-9F8C-E5BCE15D319Dclear_sam|class=sIndent|trigger=none}{code:language=javascript}
//Clear the foundset, including searches that may be on it
forms.customer.foundset.clear();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords|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:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_des|text=|trigger=button}{sub-section}{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_des|trigger=none|class=sIndent}Delete all records in foundset, resulting in empty foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7_prsdeleteAllRecords_snc|text=|trigger=button}{sub-section}{div:sub-section:deleteAllRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7}{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}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_ret|text=|trigger=button}{sub-section}{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_ret|trigger=none|class=sIndent}[Boolean] -- boolean true if all records could be deleted.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_see|text=|trigger=button}{sub-section}{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7div:class=sIndent}{sub-section:deleteAllRecords_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7_seedeleteAllRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8237C49-48C8-496B-8058-9479C6F645A7deleteAllRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = forms.customer.foundset.deleteAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682=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;}\(\[index/record]){span}{td}{tr}{tr:id=des}{td}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_des|text=|trigger=button}{sub-section}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_des|trigger=none|class=sIndent}Delete current/parameter record or the record under the given index.
If the foundset is in multiselect mode, all selected records are deleted (when no index parameter is used).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682_prsdeleteRecord_snc|text=|trigger=button}{sub-section}{div:sub-section:deleteRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:deleteRecord_prs|text=|trigger=button}{sub-section}{sub-section:deleteRecord_prs|trigger=none|class=sIndent}\[index\/record] -- index of record to delete or record itself.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_ret|text=|trigger=button}{sub-section}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_ret|trigger=none|class=sIndent}[Boolean] -- boolean true if all records could be deleted.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682_seedeleteRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682_deleteRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1B5DC9E9-0C22-4D23-ADCB-07C5F0C44682deleteRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = forms.customer.foundset.deleteRecord();
//can return false incase of related foundset having records and orphans records are not allowed by the relation
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet|class=node}{tr:id=name}{td}
h6. duplicateFoundSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundset]{span}{span:id=iets|style=float: left; font-weight: bold;}duplicateFoundSet{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet_des|text=|trigger=button}{sub-section}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet_des|trigger=none|class=sIndent}Get a duplicate of the foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_prsduplicateFoundSet_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_prsduplicateFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}{*}ReturnsParameters*
\\ {sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_retduplicateFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_retduplicateFoundSet_prs|trigger=none|class=sIndent}[JSFoundset] -- foundset duplicate.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also see*Returns*\\{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_seeduplicateFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_see|class=sIndentduplicateFoundSet_ret|trigger=none|class=sIndent}[JSFoundset] -- foundset duplicate.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:duplicateFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:duplicateFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9_seeduplicateFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2FD3DFFD-94C9-420D-B529-791ACBA8B2C9duplicateFoundSet_sam|class=sIndent|trigger=none}{code:language=javascript}
var dupFoundset = forms.customer.foundset.duplicateFoundSet();
forms.customer.foundset.find();
//search some fields
var count = forms.customer.foundset.search();
if (count == 0)
{
	plugins.dialogs.showWarningDialog('Alert', 'No records found','OK');
	controller.loadRecords(dupFoundset);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=14A23928-574F-4DCF-A719-BA7B50FB7F0A=duplicateRecord|class=node}{tr:id=name}{td}
h6. duplicateRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}duplicateRecord{span}{span:id=iets|style=float: left;}\(\[index], \[location], \[changeSelection]){span}{td}{tr}{tr:id=des}{td}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_des|text=|trigger=button}{sub-section}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_des|trigger=none|class=sIndent}Duplicate current record or record at index in the foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0A_prsduplicateRecord_snc|text=|trigger=button}{sub-section}{div:sub-section:duplicateRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0A}{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}\[index\] -- index of record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.
\[location\] -- boolean or number when true the new record is added as the topmost record, when a number, the new record is added at specified index ; defaults to 0.
\[changeSelection\] -- boolean when true the selection is changed to the duplicated record; defaults to true.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_ret|text=|trigger=button}{sub-section}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0A_duplicateRecord_ret|trigger=none|class=sIndent}[Number] -- true if succesful{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0A_seeduplicateRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:14A23928-574F-4DCF-A719-BA7B50FB7F0AduplicateRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.duplicateRecord();
forms.customer.foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
forms.customer.foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
forms.customer.foundset.duplicateRecord(3,true,true);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8B2FF744-02B0-44A0-AF16-4EEA64A712D3=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:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_des|text=|trigger=button}{sub-section}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_des|trigger=none|class=sIndent}Set the foundset in find mode.

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.
Note: always make sure to check the result of the find() method.

When in find mode, columns can be assigned string expressions 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/zero)
      &lt;x &gt;x &lt;=x &gt;=x  (comparison)
      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       (modify condition, match on entire day)
      now      (equals now, date and or time)
      //       (equals today)
      today    (equals today)
      
 Text fields:
      #c       (modify condition, case insensitive search)
      ^=       (is null or empty)
      %x%      (contains x)
      %x\_y%    (contains x followed by any char and y)
      \\&#92;%      (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 = '>1000'" finds all orders with total order details amount more than 1000.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3_prsfind_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3_prsfind_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{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:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_ret|text=|trigger=button}{sub-section}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_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:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3_seefind_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3_sam|find_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8B2FF744-02B0-44A0-AF16-4EEA64A712D3find_sam|class=sIndent|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'
	columnNumberDataProvider = '>10'
	forms.customer.foundset.search()
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort|class=node}{tr:id=name}{td}
h6. getCurrentSort{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getCurrentSort{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort_des|text=|trigger=button}{sub-section}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort_des|trigger=none|class=sIndent}Get the current sort columns.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_prsgetCurrentSort_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_prsgetCurrentSort_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{builder-show:permission=edit}{tr:id=retprs}{td}{*}ReturnsParameters*
\\ {sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_retgetCurrentSort_prs|text=|trigger=button}{sub-section}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_retgetCurrentSort_prs|trigger=none|class=sIndent}[String] -- String sort columns{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also see*Returns*\\{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_seegetCurrentSort_ret|text=|trigger=button}{sub-section}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_see|class=sIndentgetCurrentSort_ret|trigger=none|class=sIndent}[String] -- String sort columns{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getCurrentSort_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getCurrentSort_see|trigger=none}[JSFoundset.sort|JSFoundset#sort]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7_seegetCurrentSort_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:79E9AC6C-62E0-4DEE-A6CC-BB97DA67DAF7getCurrentSort_sam|classtrigger=sIndent|trigger=none}{code:language=javascript}
//reverse the current sort

//the original sort "companyName asc, companyContact desc"
//the inversed sort "companyName desc, companyContact asc"
var foundsetSort = foundset.getCurrentSort()
var sortColumns = foundsetSort.split(',')
var newFoundsetSort = ''
for(var i=0; i<sortColumns.length; i++)
{
	var currentSort = sortColumns[i]
	var sortType = currentSort.substring(currentSort.length-3)
	if(sortType.equalsIgnoreCase('asc'))
	{
		newFoundsetSort += currentSort.replace(' asc', ' desc')
	}
	else
	{
		newFoundsetSort += currentSort.replace(' desc', ' asc')
	}
	if(i != sortColumns.length - 1)
	{
		newFoundsetSort += ','
	}
}
foundset.sort(newFoundsetSort)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8490400B-EAE0-4615-8C72-F8E372CDC467=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;}\(dataProviderID){span}{td}{tr}{tr:id=des}{td}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467getDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467getDataProviderValue_des|trigger=none|class=sIndent}Get a value based on a dataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_prsgetDataProviderValue_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_prsgetDataProviderValue_snc|trigger=none|class=sIndent}dataProviderID --Replace datawith providerversion name
info{sub-section}{divtd}{tdtr}{trbuilder-show}{tr:id=retprs}{td}{*}ReturnsParameters*
\\ {sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_retgetDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_retgetDataProviderValue_prs|trigger=none|class=sIndent}Object\{[String]} dataProviderID -- Objectdata provider name
value{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_seegetDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467_see|class=sIndentgetDataProviderValue_ret|trigger=none|class=sIndent}[Object] -- Object value{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:8490400B-EAE0-4615-8C72-F8E372CDC467_seegetDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467getDataProviderValue_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467getDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8490400B-EAE0-4615-8C72-F8E372CDC467getDataProviderValue_sam|class=sIndent|trigger=none}{code:language=javascript}
var val = forms.customer.foundset.getDataProviderValue('contact_name');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource|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:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_des|text=|trigger=button}{sub-section}{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_des|trigger=none|class=sIndent}Get the datasource used.
The datasource is an url that describes the data source.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3A_prsgetDataSource_snc|text=|trigger=button}{sub-section}{div:sub-section:getDataSource_snc|trigger=none|class=sIndent} Replace with version info{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3A}{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}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_ret|text=|trigger=button}{sub-section}{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_ret|trigger=none|class=sIndent}[String] -- String data source.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_see|text=|trigger=button}{sub-section}{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3Adiv:class=sIndent}{sub-section:getDataSource_see|class=sIndent|trigger=none}[databaseManager.getDataSourceServerName|Database Manager#getDataSourceServerName]\\ [databaseManager.getDataSourceTableName|Database Manager#getDataSourceTableName]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3A_seegetDataSource_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BC9D886F-7F79-4F88-B319-B6C372A60A3AgetDataSource_sam|class=sIndent|trigger=none}{code:language=javascript}
var dataSource = forms.customer.foundset.getDataSource();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=E14CDCA4-5064-4320-B666-2E77D62AE2A2=getFoundSetFilterParams|class=node}{tr:id=name}{td}
h6. getFoundSetFilterParams{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[\]\[\]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSetFilterParams{span}{span:id=iets|style=float: left;}\(\[filterName]){span}{td}{tr}{tr:id=des}{td}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_des|text=|trigger=button}{sub-section}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_des|trigger=none|class=sIndent}Get the list of previously defined foundset filters.
The result is an array of:
 \[ tableName, dataprovider, operator, value, name ]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2_prsgetFoundSetFilterParams_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSetFilterParams_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSetFilterParams_prs|trigger=none|class=sIndent}\{[String]} \[filterName\] -- name of the filters to retrieve, get all if not specified.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_ret|text=|trigger=button}{sub-section}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_ret|trigger=none|class=sIndent}[Object]\[]\[] -- Array of filter definitions.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2_seegetFoundSetFilterParams_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2_link|class=sIndent|getFoundSetFilterParams_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E14CDCA4-5064-4320-B666-2E77D62AE2A2getFoundSetFilterParams_sam|class=sIndent|trigger=none}{code:language=javascript}
var params = foundset.getFoundSetFilterParams()
for (var i = 0; params != null && i < params.length; i++)
{
	application.output('FoundSet filter on table ' + params[i][0]+ ': '+ params[i][1]+ ' '+params[i][2]+ ' '+params[i][3] +(params[i][4] == null ? ' [no name]' : ' ['+params[i][4]+']'))
}']'))
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRecord|class=node}{tr:id=name}{td}h6.getRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]{span}{span:id=iets|style=float: left; font-weight: bold;}getRecord{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getRecord_des|text=|trigger=button}{sub-section}{sub-section:getRecord_des|trigger=none|class=sIndent}Get the record object at the index.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRecord_snc|text=|trigger=button}{sub-section}{sub-section:getRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRecord_prs|text=|trigger=button}{sub-section}{sub-section:getRecord_prs|trigger=none|class=sIndent}\{[Number]} index -- int record index
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getRecord_ret|text=|trigger=button}{sub-section}{sub-section:getRecord_ret|trigger=none|class=sIndent}[JSRecord] -- Record record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getRecord_sam|trigger=none}{code:language=javascript}
var record = forms.customer.foundset.getRecord(index);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5A7BE138-735C-4F18-8D54-0439359C586D=getRecordIndex|class=node}{tr:id=name}{td}
h6. getRecordgetRecordIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecordNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getRecordgetRecordIndex{span}{span:id=iets|style=float: left;}\(indexrecord){span}{td}{tr}{tr:id=des}{td}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_des|text=|trigger=button}{sub-section}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_des|trigger=none|class=sIndent}Get the record object at the index.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:5A7BE138-735C-4F18-8D54-0439359C586D_prsgetRecordIndex_snc|text=|trigger=button}{sub-section}{div:sub-section:getRecordIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section:5A7BE138-735C-4F18-8D54-0439359C586D}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRecordIndex_prs|text=|trigger=button}{sub-section}{sub-section:getRecordIndex_prs|trigger=none}index|class=sIndent}\{[JSRecord]} record -- int record indexRecord
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_ret|text=|trigger=button}{sub-section}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_ret|trigger=none|class=sIndent}[JSRecordNumber] -- Recordint recordindex.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5A7BE138-735C-4F18-8D54-0439359C586D_seegetRecordIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5A7BE138-735C-4F18-8D54-0439359C586DgetRecordIndex_sam|class=sIndent|trigger=none}{code:language=javascript}
var recordindex = forms.customer.foundset.getRecordgetRecordIndex(indexrecord);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName|class=node}{tr:id=name}{td}
h6. getRelationName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelationName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5{sub-section:getRelationName_des|text=|trigger=button}{sub-section}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_des|trigger=none|class=sIndent}Gets the relation name (null if not a related foundset).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5_prsgetRelationName_snc|text=|trigger=button}{sub-section}{div:sub-section:getRelationName_snc|trigger=none|class=sIndent} Replace with version info{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getRelationName_prs|text=|trigger=button}{sub-section}{sub-section:getRelationName_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_ret|text=|trigger=button}{sub-section}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_ret|trigger=none|class=sIndent}[String] -- String relation name when related.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5_seegetRelationName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:120D87EF-90EB-42F7-80DE-1C1EA0CC46C5getRelationName_sam|class=sIndent|trigger=none}{code:language=javascript}
var relName = forms.customer.foundset.getRelationName();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2E962116-677D-4828-A0B0-9177130FCB59=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:2E962116-677D-4828-A0B0-9177130FCB59_desgetSelectedIndex_des|text=|trigger=button}{sub-section}{sub-section:getSelectedIndex_des|trigger=none|class=sIndent}Get the current record index of the 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:2E962116-677D-4828-A0B0-9177130FCB59_desgetSelectedIndex_snc|trigger=none|class=sIndent}Get theReplace currentwith record index of the foundset.version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_ret|text=|trigger=button}{sub-section}{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_ret|trigger=none|class=sIndent}[Number] -- int current index (1-based){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2E962116-677D-4828-A0B0-9177130FCB59_seegetSelectedIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:2E962116-677D-4828-A0B0-9177130FCB59{sub-section:getSelectedIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2E962116-677D-4828-A0B0-9177130FCB59getSelectedIndex_sam|class=sIndent|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.foundset.getSelectedIndex();
//sets the next record in the foundset
forms.customer.foundset.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes|class=node}{tr:id=name}{td}
h6. getSelectedIndexes{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]\[\]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedIndexes{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_des|text=|trigger=button}{sub-section}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7C_desgetSelectedIndexes_des|trigger=none|class=sIndent}Get the selected records indexes.
When the founset is in multiSelect mode (see property multiSelect), selection can be a more than 1 index.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSelectedIndexes_snc|text=|trigger=button}{sub-section}{sub-section:getSelectedIndexes_snc|trigger=none|class=sIndent}Get theReplace selectedwith records indexes.
When the founset is in multiSelect mode (see property multiSelect), selection can be a more than 1 index.version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_ret|text=|trigger=button}{sub-section}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_ret|trigger=none|class=sIndent}[Number]\[] -- Array current indexes (1-based){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7C_seegetSelectedIndexes_link|text=|trigger=button}{sub-section}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7C_link|class=sIndentdiv:class=sIndent}{sub-section:getSelectedIndexes_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:679AB72D-721A-4EAE-A753-D3F5A85C1C7CgetSelectedIndexes_sam|class=sIndent|trigger=none}{code:language=javascript}
var current = forms.customer.foundset.getSelectedIndexes();
var newSelection = new Array();
newSelection[0] = current[0];
forms.customer.foundset.setSelectedIndexes(newSelection);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060=getSelectedRecord|class=node}{tr:id=name}{td}
h6. getSelectedRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedRecord{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_des|text=|trigger=button}{sub-section}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_des|trigger=none|class=sIndent}Get the selected record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060_prsgetSelectedRecord_snc|text=|trigger=button}{sub-section}{div:sub-section:getSelectedRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSelectedRecord_prs|text=|trigger=button}{sub-section}{sub-section:getSelectedRecord_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_ret|text=|trigger=button}{sub-section}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_ret|trigger=none|class=sIndent}[JSRecord] -- Record record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060_seegetSelectedRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8E3E7BE-AD9C-4CCF-BB7C-4B878C2D2060getSelectedRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
var selectedRecord = forms.customer.foundset.getSelectedRecord();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords|class=node}{tr:id=name}{td}
h6. getSelectedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]\[\]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_des|text=|trigger=button}{sub-section}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_des|trigger=none|class=sIndent}Get the selected records.
When the founset is in multiSelect mode (see property multiSelect), selection can be a more than 1 record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29F_prsgetSelectedRecords_snc|text=|trigger=button}{sub-section}{div:sub-section:getSelectedRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29F}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSelectedRecords_prs|text=|trigger=button}{sub-section}{sub-section:getSelectedRecords_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_ret|text=|trigger=button}{sub-section}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_ret|trigger=none|class=sIndent}[JSRecord]\[] -- Array current records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29F_seegetSelectedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:408E2643-18B9-449B-ABBA-A4C7AA87D29FgetSelectedRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
var selectedRecords = forms.customer.foundset.getSelectedRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize|class=node}{tr:id=name}{td}
h6. getSize{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getSize{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_des|text=|trigger=button}{sub-section}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_des|trigger=none|class=sIndent}Get the number of records in this foundset.
This is the number of records loaded, note that when looping over a foundset, size() may
increase as more records are loaded. are loaded.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSize_snc|text=|trigger=button}{sub-section}{sub-section:getSize_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:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_ret|text=|trigger=button}{sub-section}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_ret|trigger=none|class=sIndent}[Number] -- int current size.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4A_seegetSize_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:02A2A33E-6C7B-4D08-9912-CC86FE997C4AgetSize_sam|class=sIndent|trigger=none}{code:language=javascript}
var nrRecords = forms.customer.foundset.getSize()

// to loop over foundset, recalculate size for each record
	for (var i = 1; i <= forms.customer.foundset.getSize(); i++)
	{
		var rec = forms.customer.foundset.getRecord(i);
	}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords|class=node}{tr:id=name}{td}
h6. invertRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{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:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_des|text=|trigger=button}{sub-section}{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_des|trigger=none|class=sIndent}Invert the 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=prssnc}{td}*ParametersSince*\\{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAA_prsinvertRecords_snc|text=|trigger=button}{sub-section}{div:sub-section:invertRecords_snc|trigger=none|class=sIndent} Replace with version info{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAA}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:invertRecords_prs|text=|trigger=button}{sub-section}{sub-section:invertRecords_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_ret|text=|trigger=button}{sub-section}{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAA_seeinvertRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8B53C6B-2FAB-4EB2-9A40-60000837AEAAinvertRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.invertRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind|class=node}{tr:id=name}{td}
h6. isInFind{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isInFind{span}{span:id=iets|style=float: left;}(){span}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isInFind_des|text=|trigger=button}{sub-section}{sub-section:isInFind_des|trigger=none|class=sIndent}Check if this foundset is in find mode.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919C_desisInFind_snc|text=|trigger=button}{sub-section}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919C_desisInFind_snc|trigger=none|class=sIndent}Check ifReplace thiswith foundset is in find mode.version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_ret|text=|trigger=button}{sub-section}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_ret|trigger=none|class=sIndent}[Boolean] -- boolean is in find mode.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919C_seeisInFind_link|text=|trigger=button}{sub-sectionsub-section}{div:class=sIndent}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AA51F52-3EC3-4D29-BD59-96ED3964919CisInFind_sam|class=sIndent|trigger=none}{code:language=javascript}
//Returns true when find was called on this foundset and search has not been called yet
forms.customer.foundset.isInFind();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8=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:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_des|text=|trigger=button}{sub-section}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_des|trigger=none|class=sIndent}Loads all accessible records from the datasource into the foundset.
Filters on the foundset are applied.

Before loading the records, 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),
records will not be loaded, validation failures or sql errors) or is not allowed (autosave off), 
records will not be loaded,{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:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_ret|text=|trigger=button}{sub-section}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_ret|trigger=none|class=sIndent}[Boolean] -- true if records are loaded, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_see|class=sIndent|trigger=none}[JSFoundset.addFoundSetFilterParam|JSFoundset#addFoundSetFilterParam]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8_seeloadAllRecords_link|text=|trigger=button}{sub-sectionsub-section}{div:class=sIndent}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:885FC730-B4B4-4FC5-B2D6-A9EED6FD92A8loadAllRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.loadAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4F743A1E-735A-41FE-8633-6C1137703D50=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:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_des|text=|trigger=button}{sub-section}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_des|trigger=none|class=sIndent}Loads the records that are currently omitted as a foundset.

Before loading the omitted records, 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),
omitted records will not be loaded, allowed (autosave off), 
omitted records will not be loaded,{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:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_ret|text=|trigger=button}{sub-section}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_ret|trigger=none|class=sIndent}[Boolean] -- true if records are loaded, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50_seeloadOmittedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4F743A1E-735A-41FE-8633-6C1137703D50loadOmittedRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.loadOmittedRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=784F1901-F56C-41C4-8BED-B0D178513241=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;}\(\[input], \[queryArgumentsArray]){span}{td}{tr}{tr:id=des}{td}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_des|text=|trigger=button}{sub-section}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_des|trigger=none|class=sIndent}Load records with primary key (dataset/number/uuid) or query.

Load records can be used in 5 different ways
1) to copy foundset data from another foundset
foundset.loadRecords(fs);

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

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

4) to reload all last related records again, if for example when searched in tabpanel
foundset.loadRecords();

5) to load records in to the form based on a query (also known as 'Form by query')
foundset.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' 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:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_prs|trigger=none|class=sIndent}\[input\] -- foundset/pkdataset/single\_pk/query
\[queryArgumentsArray\] -- used when input is a query
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_ret|text=|trigger=button}{sub-section}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_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:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:784F1901-F56C-41C4-8BED-B0D178513241_seesub-section:loadRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:784F1901-F56C-41C4-8BED-B0D178513241loadRecords_sam|class=sIndent|trigger=none}{code:language=javascript}
//Load records can be used in 5 different ways
//1) to copy foundset data from another foundset
//forms.customer.foundset.loadRecords(fs);

//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.foundset.loadRecords(dataset);

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

//4) to reload all last related records again, if for example when searched in tabpanel
//forms.customer.foundset.loadRecords();

//5) to load records in to the form based on a query (also known as 'Form by query')
//forms.customer.foundset.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=2420CAEC-A799-496B-A72C-0CE5216318D4=newRecord|class=node}{tr:id=name}{td}
h6. newRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}newRecord{span}{span:id=iets|style=float: left;}\(\[location], \[changeSelection]){span}{td}{tr}{tr:id=des}{td}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4_desnewRecord_des|text=|trigger=button}{sub-section}{sub-section:newRecord_des|trigger=none|class=sIndent}Create a new record in the 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:2420CAEC-A799-496B-A72C-0CE5216318D4_desnewRecord_snc|trigger=none|class=sIndent}Create aReplace newwith record in the foundset.version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_prs|trigger=none|class=sIndent}\[location\] -- boolean or number when true the new record is added as the topmost record, when a number, the new record is added at specified index ; defaults to 0.
\[changeSelection\] -- boolean when true the selection is changed to the new record; defaults to true.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_ret|text=|trigger=button}{sub-section}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_ret|trigger=none|class=sIndent}[Number] -- int index of new record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4_seenewRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4{sub-section:newRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2420CAEC-A799-496B-A72C-0CE5216318D4newRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
// foreign key data is only filled in for equals (=) relation items 
forms.customer.foundset.newRecord();
//forms.customer.foundset.newRecord(2); //adds as second record
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord|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;}\(\[index]){span}{td}{tr}{tr:id=des}{td}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_des|text=|trigger=button}{sub-section}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_des|trigger=none|class=sIndent}Omit current record or the record under the given index, to be shown with loadOmittedRecords.
If the foundset is in multiselect mode, all selected records are omitted (when no index parameter is used).

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords(){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}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_prs|trigger=none|class=sIndent}\[index\] -- index of record to omit.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_ret|text=|trigger=button}{sub-section}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_ret|trigger=none|class=sIndent}[Boolean] -- boolean true if all records could be omitted.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_see|class=sIndent|trigger=none}[JSFoundset.loadOmittedRecords|JSFoundset#loadOmittedRecords]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2_seeomitRecord_link|text=|trigger=button}{sub-sectionsection}{div:class=sIndent}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FD78FB04-6245-4063-9405-DF1259B2B6A2omitRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = forms.customer.foundset.omitRecord();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup|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;}\(\[index]){span}{td}{tr}{tr:id=des}{td}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_des|text=|trigger=button}{sub-section}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_des|trigger=none|class=sIndent}Perform a relookup for the current record or the record under the given index
Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation. 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}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_prs|trigger=none|class=sIndent}\[index\] -- record index (1\-based)
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_ret|text=|trigger=button}{sub-section}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577A_seerelookup_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1391CC9B-A267-4F3B-8FF9-A586117C577Arelookup_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.relookup(1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam|class=node}{tr:id=name}{td}
h6. removeFoundSetFilterParam{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeFoundSetFilterParam{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26B_desremoveFoundSetFilterParam_des|text=|trigger=button}{sub-section}{sub-section:removeFoundSetFilterParam_des|trigger=none|class=sIndent}Remove a named foundset filter.
Use clear() or loadAllRecords() to make the filter effective.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeFoundSetFilterParam_snc|text=|trigger=button}{sub-section}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26B_desremoveFoundSetFilterParam_snc|trigger=none|class=sIndent}Remove aReplace namedwith foundset filter.
Use clear() or loadAllRecords() to make the filter effective.version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_prs|trigger=none|class=sIndent}\{[String]} name -- String filter name.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_ret|text=|trigger=button}{sub-section}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_ret|trigger=none|class=sIndent}[Boolean] -- true if removing the filter succeeded, false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26B_seeremoveFoundSetFilterParam_link|text=|trigger=button}{sub-section}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26B_link|class=sIndentdiv:class=sIndent}{sub-section:removeFoundSetFilterParam_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0C75C4EE-E6AD-44BE-8272-30AA4780D26BremoveFoundSetFilterParam_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = forms.customer.foundset.removeFoundSetFilterParam('custFilter');// removes all filters with this name
forms.customer.foundset.loadAllRecords();//to make param(s) effective
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=68AE4ED8-B476-4C26-A7A0-60F636C9ADC5=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:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_des|text=|trigger=button}{sub-section}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_des|trigger=none|class=sIndent}Perform a search and show the results.
Must be in find mode when running search (see find()). in find mode when running search (see find()).{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:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_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}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_ret|text=|trigger=button}{sub-section}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_ret|trigger=none|class=sIndent}[Number] -- int number of rows returned{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_see|class=sIndent|trigger=none}[JSFoundset.find|JSFoundset#find]\\ {sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5_seesearch_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:68AE4ED8-B476-4C26-A7A0-60F636C9ADC5search_sam|class=sIndent|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=2C3EADDA-F616-4F23-B940-115EE18A344B=selectRecord|class=node}{tr:id=name}{td}
h6. selectRecord{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}selectRecord{span}{span:id=iets|style=float: left;}\(pkid1, \[pkid2], \[pkidn]){span}{td}{tr}{tr:id=des}{td}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_des|text=|trigger=button}{sub-section}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_des|trigger=none|class=sIndent}Select the record based on pk data.
Note that if the foundset has not loaded the record with the pk, selectrecord will fail.

In case of a table with a composite key, the pk sequence must match the alphabetical
ordering of the pk column names.
In case of a table with a composite key, the pk sequence must match the alphabetical 
ordering of the pk column names.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:selectRecord_snc|text=|trigger=button}{sub-section}{sub-section:selectRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_prs|trigger=none|class=sIndent}pkid1 -- primary key
\[pkid2\] -- second primary key (in case of composite primary key)
\[pkidn\] -- nth primary key
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_ret|text=|trigger=button}{sub-section}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if succeeded.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344B_seeselectRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2C3EADDA-F616-4F23-B940-115EE18A344BselectRecord_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.selectRecord(pkid1,pkid2,pkidn);//pks must be alphabetically set! It is also possible to use an array as parameter.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2=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;}\(dataProviderID, value){span}{td}{tr}{tr:id=des}{td}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_des|text=|trigger=button}{sub-section}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_des|trigger=none|class=sIndent}Set a value based on a dataprovider name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_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}{div:class=sIndent}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_prs|trigger=none|class=sIndent}\{[String]} dataProviderID -- data provider name
\{[Object]} value -- value to set
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_ret|text=|trigger=button}{sub-section}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2_seesetDataProviderValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EEFEEDAF-D5C3-4DB1-8E38-D56D4AF36FB2setDataProviderValue_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.setDataProviderValue('contact_name','mycompany');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A1E7D03D-7C1E-4BBC-96A5-25F78185A525=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:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_des|text=|trigger=button}{sub-section}{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_des|trigger=none|class=sIndent}Set the current record index.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}{*}ParametersSince*
\\ {sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525_prssetSelectedIndex_snc|text=|trigger=button}{sub-section}{div:sub-section:setSelectedIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525}{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}index -- int index to set (1\-based)
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_ret|text=|trigger=button}{sub-section}{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_see|text=|trigger=button}{sub-section-section}{div:class=sIndent}{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525_seesetSelectedIndex_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A1E7D03D-7C1E-4BBC-96A5-25F78185A525setSelectedIndex_sam|class=sIndent|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.foundset.getSelectedIndex();
//sets the next record in the foundset
forms.customer.foundset.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=060131D3-DF94-4E94-91A0-1899C8318B9B=setSelectedIndexes|class=node}{tr:id=name}{td}
h6. setSelectedIndexes{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setSelectedIndexes{span}{span:id=iets|style=float: left;}\(indexes){span{span}{td}{tr}{tr:id=des}{td}{sub-section:setSelectedIndexes_des|text=|trigger=button}{sub-section}{sub-section:setSelectedIndexes_des|trigger=none|class=sIndent}Set the selected records indexes.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9B_dessetSelectedIndexes_snc|text=|trigger=button}{sub-section}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9B_dessetSelectedIndexes_snc|trigger=none|class=sIndent}Set theReplace selectedwith recordsversion indexes.info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}{*}Parameters*
\\ {sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_prs|trigger=none|class=sIndent}\{[Object]\[]} indexes -- An array with indexes to set.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_ret|text=|trigger=button}{sub-section}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9B_seesetSelectedIndexes_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:060131D3-DF94-4E94-91A0-1899C8318B9BsetSelectedIndexes_sam|class=sIndent|trigger=none}{code:language=javascript}
var current = forms.customer.foundset.getSelectedIndexes();
var newSelection = new Array();
newSelection[0] = current[0];
forms.customer.foundset.setSelectedIndexes(newSelection);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort|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:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_des|text=|trigger=button}{sub-section}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_des|trigger=none|class=sIndent}Sorts the 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. 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:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_prs|trigger=none|class=sIndent}sortString -- the specified columns (and sort order)
\[defer\] -- boolean when true, 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}{div}{td}{tr}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_ret|text=|trigger=button}{sub-section}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6_seesort_link|text=|trigger=button}{sub-sectionsub-section}{div:class=sIndent}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5CD48EAA-09B7-4005-8BB8-F167BEA8A4A6sort_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.sort('columnA desc,columnB asc');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=901A1021-A1A9-40B5-B6B1-798081778C64unrelate|class=node}{tr:id=name}{td}
h6. unrelate{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundset]{span}{span:id=iets|style=float: left; font-weight: bold;}unrelate{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_des|text=|trigger=button}{sub-section}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_des|trigger=none|class=sIndent}Create a new unrelated foundset that is a copy of the current foundset.
If the current foundset is not related, no copy will made., no copy will made.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:unrelate_snc|text=|trigger=button}{sub-section}{sub-section:unrelate_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:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_prs|trigger=none|class=sIndent}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}{*}Returns*
\\ {sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_ret|text=|trigger=button}{sub-section}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_ret|trigger=none|class=sIndent}[JSFoundset] -- FoundSet unrelated foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64_seeunrelate_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}{*}Sample*
\\ {sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:901A1021-A1A9-40B5-B6B1-798081778C64unrelate_sam|class=sIndent|trigger=none}{code:language=javascript}
forms.customer.foundset.unrelate();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}