Versions Compared

Key

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

{table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[JSFoundSet]{span}{span:class=sWordList}[JSColumn]{span}{span:class=sWordList}[JSDataSet]{span}{span:class=sWordList}[JSFoundSetUpdater]{span}{span:class=sWordList}[JSTable]{span}{span:class=sWordList}[JSRecord]{span}{span:class=sWordList}[QBAggregate]{span}{span:class=sWordList}[QBColumn]{span}{span:class=sWordList}[QBColumns]{span}{span:class=sWordList}[QBCondition]{span}{span:class=sWordList}[QBFunction]{span}{span:class=sWordList}[QBFunctions]{span}{span:class=sWordList}[QBGroupBy]{span}{span:class=sWordList}[QBJoin]{span}{span:class=sWordList}[QBJoins]{span}{span:class=sWordList}[QBLogicalCondition]{span}{span:class=sWordList}[QBParameter]{span}{span:class=sWordList}[QBParameters]{span}{span:class=sWordList}[QBPart]{span}{span:class=sWordList}[QBResult]{span}{span:class=sWordList}[QBSelect]{span}{span:class=sWordList}[QBSort]{span}{span:class=sWordList}[QBSorts]{span}{span:class=sWordList}[QBTableClause]{span}{span:class=sWordList}[QUERY_COLUMN_TYPES]{span}{span:class=sWordList}[SQL_ACTION_TYPES]{span}{td}{tr}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#nullColumnValidatorEnabled]
Enable/disable the default null validator for non null columns, makes it possible todo the checks later on when saving, when for example autosave is disabled.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#acquireLock]\(foundset, recordIndex)
Request lock(s) for a foundset, can be a normal or related foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#acquireLock]\(foundset, recordIndex, lockName)
Request lock(s) for a foundset, can be a normal or related foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addTableFilterParam]\(serverName, tableName, dataprovider, operator, value)
Adds a filter to all the foundsets based on a table.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addTableFilterParam]\(serverName, tableName, dataprovider, operator, value, filterName)
Adds a filter to all the foundsets based on a table.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addTrackingInfo]\(columnName, value)
Add tracking info used in the log table.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#commitTransaction]\()
Returns true if a transaction is committed; rollback if commit fails.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#commitTransaction]\(saveFirst)
Returns true if a transaction is committed; rollback if commit fails.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#commitTransaction]\(saveFirst, revertSavedRecords)
Returns true if a transaction is committed; rollback if commit fails.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundSet]{td}{td}[#convertFoundSet]\(foundset, related)
Creates a foundset that combines all the records of the specified one\-to\-many relation seen from the given parent/primary foundset.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#convertToDataSet]\(foundset)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#convertToDataSet]\(foundset, dataproviderNames)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#convertToDataSet]\(values)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#convertToDataSet]\(values, dataproviderNames)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#convertToDataSet]\(ids)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyMatchingFields]\(source, destination)
Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyMatchingFields]\(source, destination, overwrite)
Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyMatchingFields]\(source, destination, names)
Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#createDataSourceByQuery]\(name, query, max_returned_rows)
Performs a query on the specified server, saves the the result in a datasource.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#createDataSourceByQuery]\(name, server_name, sql_query, arguments, max_returned_rows)
Performs a sql query on the specified server, saves the the result in a datasource.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#createEmptyDataSet]\()
Returns an empty dataset object.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#createEmptyDataSet]\(rowCount, columnCount)
Returns an empty dataset object.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#createEmptyDataSet]\(rowCount, columnNames)
Returns an empty dataset object.{td}{tr}{tbody}{tbody}{tr}{td}[QBSelect]{td}{td}[#createSelect]\(dataSource)
Create a QueryBuilder object for a datasource.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#dataSourceExists]\(datasource)
Check wether a data source exists.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#getAutoSave]\()
Returns true or false if autosave is enabled or disabled.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getDataSetByQuery]\(query, max_returned_rows)
Performs a sql query with a query builder object.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getDataSetByQuery]\(server_name, sql_query, arguments, max_returned_rows)
Performs a sql query on the specified server, returns the result in a dataset.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDataSourceServerName]\(dataSource)
Returns the server name from the datasource, or null if not a database datasource.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDataSourceTableName]\(dataSource)
Returns the table name from the datasource, or null if not a database datasource.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDatabaseProductName]\(serverName)
Returns the database product name as supplied by the driver for a server.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]\[]{td}{td}[#getEditedRecords]\()
Returns an array of edited records with outstanding (unsaved) data.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]\[]{td}{td}[#getEditedRecords]\(foundset)
Returns an array of edited records with outstanding (unsaved) data.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]\[]{td}{td}[#getFailedRecords]\()
Returns an array of records that fail after a save.{td}{tr}{tbody}{tbody}{tr}{td}[JSRecord]\[]{td}{td}[#getFailedRecords]\(foundset)
Returns an array of records that fail after a save.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundSet]{td}{td}[#getFoundSet]\(query)
Returns a foundset object for a specified pk query.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundSet]{td}{td}[#getFoundSet]\(dataSource)
Returns a foundset object for a specified datasource or server and tablename.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundSet]{td}{td}[#getFoundSet]\(serverName, tableName)
Returns a foundset object for a specified datasource or server and tablename.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getFoundSetCount]\(foundset)
Returns the total number of records in a foundset.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundSetUpdater]{td}{td}[#getFoundSetUpdater]\(foundset)
Returns a JSFoundsetUpdater object that can be used to update all or a specific number of rows in the specified foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getNextSequence]\(dataSource, columnName)
Gets the next sequence for a column which has a sequence defined in its column dataprovider properties.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getSQL]\(foundset)
Returns the internal SQL which defines the specified (related)foundset.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getSQL]\(foundset, includeFilters)
Returns the internal SQL which defines the specified (related)foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getSQLParameters]\(foundset)
Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getSQLParameters]\(foundset, includeFilters)
Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getServerNames]\()
Returns an array with all the server names used in the solution.{td}{tr}{tbody}{tbody}{tr}{td}[JSTable]{td}{td}[#getTable]\(foundset)
Returns the JSTable object from which more info can be obtained (like columns).{td}{tr}{tbody}{tbody}{tr}{td}[JSTable]{td}{td}[#getTable]\(record)
Returns the JSTable object from which more info can be obtained (like columns).{td}{tr}{tbody}{tbody}{tr}{td}[JSTable]{td}{td}[#getTable]\(dataSource)
Returns the JSTable object from which more info can be obtained (like columns).{td}{tr}{tbody}{tbody}{tr}{td}[JSTable]{td}{td}[#getTable]\(serverName, tableName)
Returns the JSTable object from which more info can be obtained (like columns).{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getTableCount]\(dataSource)
Returns the total number of records(rows) in a table.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]\[]{td}{td}[#getTableFilterParams]\(serverName)
Returns a two dimensional array object containing the table filter information currently applied to the servers tables.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]\[]{td}{td}[#getTableFilterParams]\(serverName, filterName)
Returns a two dimensional array object containing the table filter information currently applied to the servers tables.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getTableNames]\(serverName)
Returns an array of all table names for a specified server.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getViewNames]\(serverName)
Returns an array of all view names for a specified server.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasLocks]\()
Returns true if the current client has any or the specified lock(s) acquired.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasLocks]\(lockName)
Returns true if the current client has any or the specified lock(s) acquired.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasNewRecords]\(foundset)
Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasNewRecords]\(foundset, index)
Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasNewRecords]\(record)
Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecordChanges]\(foundset)
Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecordChanges]\(foundset, index)
Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecordChanges]\(record)
Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecords]\(foundset)
Returns true if the (related)foundset exists and has records.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasRecords]\(record, relationString)
Returns true if the (related)foundset exists and has records.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasTransaction]\()
Returns true if there is an transaction active for this client.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mergeRecords]\(sourceRecord, combinedDestinationRecord)
Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination 
record pk, deletes source record.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#mergeRecords]\(sourceRecord, combinedDestinationRecord, columnNames)
Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination 
record pk, deletes source record.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#recalculate]\(foundsetOrRecord)
Can be used to recalculate a specified record or all rows in the specified foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#refreshRecordFromDatabase]\(foundset, index)
Flushes the client data cache and requeries the data for a record (based on the record index) in a foundset or all records in the foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#releaseAllLocks]\()
Release all current locks the client has (optionally limited to named locks).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#releaseAllLocks]\(lockName)
Release all current locks the client has (optionally limited to named locks).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeTableFilterParam]\(serverName, filterName)
Removes a previously defined table filter.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#revertEditedRecords]\()
Reverts outstanding (not saved) in memory changes from edited records.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#revertEditedRecords]\(foundset)
Reverts outstanding (not saved) in memory changes from edited records.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#revertEditedRecords]\(record)
Reverts outstanding (not saved) in memory changes from edited records.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#rollbackTransaction]\()
Rollback a transaction started by databaseManager.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#rollbackTransaction]\(rollbackEdited)
Rollback a transaction started by databaseManager.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#rollbackTransaction]\(rollbackEdited, revertSavedRecords)
Rollback a transaction started by databaseManager.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#saveData]\()
Saves all outstanding (unsaved) data and exits the current record.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#saveData]\(foundset)
Saves all outstanding (unsaved) data and exits the current record.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#saveData]\(record)
Saves all outstanding (unsaved) data and exits the current record.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setAutoSave]\(autoSave)
Set autosave, if false then no saves will happen by the ui (not including deletes!).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setCreateEmptyFormFoundsets]\()
Turnoff the initial form foundset record loading, set this in the solution open method.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#startTransaction]\()
Start a database transaction.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#switchServer]\(sourceName, destinationName)
Switches a named server to another named server with the same datamodel (recommended to be used in an onOpen method for a solution).{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=nullColumnValidatorEnabled|class=node}{tr:id=name}{td}h6.nullColumnValidatorEnabled{td}{tr}{tr:id=des}{td}{sub-section:nullColumnValidatorEnabled_des|text=|trigger=button}{sub-section}{sub-section:nullColumnValidatorEnabled_des|trigger=none|class=sIndent}Enable/disable the default null validator for non null columns, makes it possible todo the checks later on when saving, when for example autosave is disabled.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:nullColumnValidatorEnabled_snc|text=|trigger=button}{sub-section}{sub-section:nullColumnValidatorEnabled_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:nullColumnValidatorEnabled_prs|text=|trigger=button}{sub-section}{sub-section:nullColumnValidatorEnabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:nullColumnValidatorEnabled_ret|text=|trigger=button}{sub-section}{sub-section:nullColumnValidatorEnabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:nullColumnValidatorEnabled_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:nullColumnValidatorEnabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:nullColumnValidatorEnabled_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:nullColumnValidatorEnabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:nullColumnValidatorEnabled_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:nullColumnValidatorEnabled_sam|trigger=none}{code:language=javascript}
databaseManager.nullColumnValidatorEnabled = false;//disable

//test if enabled
if(databaseManager.nullColumnValidatorEnabled) application.output('null validation enabled')
{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=acquireLock-JSFoundSet_Number|class=node}{tr:id=name}{td}h6.acquireLock{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}acquireLock{span}{span:id=iets|style=float: left;}\(foundset, recordIndex){span}{td}{tr}{tr:id=des}{td}{sub-section:acquireLock-JSFoundSet_Number_des|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_des|trigger=none|class=sIndent}Request lock(s) for a foundset, can be a normal or related foundset.
The record\_index can be \-1 to lock all rows, 0 to lock the current row, or a specific row of > 0 
Optionally name the lock(s) so that it can be referenced it in releaseAllLocks()

returns true if the lock could be acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:acquireLock-JSFoundSet_Number_snc|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:acquireLock-JSFoundSet_Number_prs|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to get the lock for
\{[Number]} recordIndex -- The record index which should be locked.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:acquireLock-JSFoundSet_Number_ret|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_ret|trigger=none|class=sIndent}[Boolean] -- true if the lock could be acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:acquireLock-JSFoundSet_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:acquireLock-JSFoundSet_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:acquireLock-JSFoundSet_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_sam|trigger=none}{code:language=javascript}
//locks the complete foundset
databaseManager.acquireLock(foundset,-1);

//locks the current row
databaseManager.acquireLock(foundset,0);

//locks all related orders for the current Customer
var success = databaseManager.acquireLock(Cust_to_Orders,-1);
if(!success)
{
	plugins.dialogs.showWarningDialog('Alert','Failed to get a lock','OK');
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=acquireLock-JSFoundSet_Number_String|class=node}{tr:id=name}{td}h6.acquireLock{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}acquireLock{span}{span:id=iets|style=float: left;}\(foundset, recordIndex, lockName){span}{td}{tr}{tr:id=des}{td}{sub-section:acquireLock-JSFoundSet_Number_String_des|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_String_des|trigger=none|class=sIndent}Request lock(s) for a foundset, can be a normal or related foundset.
The record\_index can be \-1 to lock all rows, 0 to lock the current row, or a specific row of > 0 
Optionally name the lock(s) so that it can be referenced it in releaseAllLocks()

returns true if the lock could be acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:acquireLock-JSFoundSet_Number_String_snc|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:acquireLock-JSFoundSet_Number_String_prs|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_String_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to get the lock for
\{[Number]} recordIndex -- The record index which should be locked.
\{[String]} lockName -- The name of the lock.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:acquireLock-JSFoundSet_Number_String_ret|text=|trigger=button}{sub-section}{sub-section:acquireLock-JSFoundSet_Number_String_ret|trigger=none|class=sIndent}[Boolean] -- true if the lock could be acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:acquireLock-JSFoundSet_Number_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:acquireLock-JSFoundSet_Number_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:acquireLock-JSFoundSet_Number_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:acquireLock-JSFoundSet_Number_String_sam|trigger=none}{code:language=javascript}
//locks the complete foundset
databaseManager.acquireLock(foundset,-1);

//locks the current row
databaseManager.acquireLock(foundset,0);

//locks all related orders for the current Customer
var success = databaseManager.acquireLock(Cust_to_Orders,-1);
if(!success)
{
	plugins.dialogs.showWarningDialog('Alert','Failed to get a lock','OK');
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addTableFilterParam-String_String_String_String_Object|class=node}{tr:id=name}{td}h6.addTableFilterParam{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addTableFilterParam{span}{span:id=iets|style=float: left;}\(serverName, tableName, dataprovider, operator, value){span}{td}{tr}{tr:id=des}{td}{sub-section:addTableFilterParam-String_String_String_String_Object_des|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_des|trigger=none|class=sIndent}Adds a filter to all the foundsets based on a table.
Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name.
A dataprovider can have multiple filters defined, they will all be applied.
returns true if the tablefilter could be applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addTableFilterParam-String_String_String_String_Object_snc|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addTableFilterParam-String_String_String_String_Object_prs|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_prs|trigger=none|class=sIndent}\{[String]} serverName -- The name of the database server connection for the specified table name.
\{[String]} tableName -- The name of the specified table.
\{[String]} dataprovider -- A specified dataprovider column name.
\{[String]} operator -- One of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "||=" (or\-is\-null).
\{[Object]} value -- The specified filter value.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addTableFilterParam-String_String_String_String_Object_ret|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_ret|trigger=none|class=sIndent}[Boolean] -- true if the tablefilter could be applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addTableFilterParam-String_String_String_String_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addTableFilterParam-String_String_String_String_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addTableFilterParam-String_String_String_String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_sam|trigger=none}{code:language=javascript}
// Best way to call this in a global solution startup method, but filters may be added/removed at any time.
// Note that multiple filters can be added to the same dataprovider, they will all be applied.

// filter on messages table where messagesid>10, the filter has a name so it can be removed using databaseManager.removeTableFilterParam()
var success = databaseManager.addTableFilterParam('admin', 'messages', 'messagesid', '>', 10, 'higNumberedMessagesRule')

// all tables that have the companyid column should be filtered
var success = databaseManager.addTableFilterParam('crm', null, 'companyidid', '=', currentcompanyid)

// some filters with in-conditions
var success = databaseManager.addTableFilterParam('crm', 'products', 'productcode', 'in', [120, 144, 200])
var success = databaseManager.addTableFilterParam('crm', 'orders', 'countrycode', 'in', 'select country code from countries where region = "Europe"')

// you can use modifiers in the operator as well, filter on companies where companyname is null or equals-ignore-case 'servoy'
var success = databaseManager.addTableFilterParam('crm', 'companies', 'companyname', '#^||=', 'servoy')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addTableFilterParam-String_String_String_String_Object_String|class=node}{tr:id=name}{td}h6.addTableFilterParam{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addTableFilterParam{span}{span:id=iets|style=float: left;}\(serverName, tableName, dataprovider, operator, value, filterName){span}{td}{tr}{tr:id=des}{td}{sub-section:addTableFilterParam-String_String_String_String_Object_String_des|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_String_des|trigger=none|class=sIndent}Adds a filter to all the foundsets based on a table.
Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name.
A dataprovider can have multiple filters defined, they will all be applied.
returns true if the tablefilter could be applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_snc|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_String_prs|trigger=none|class=sIndent}\{[String]} serverName -- The name of the database server connection for the specified table name.
\{[String]} tableName -- The name of the specified table.
\{[String]} dataprovider -- A specified dataprovider column name.
\{[String]} operator -- One of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "||=" (or\-is\-null).
\{[Object]} value -- The specified filter value.
\{[String]} filterName -- The specified name of the database table filter.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:addTableFilterParam-String_String_String_String_Object_String_ret|trigger=none|class=sIndent}[Boolean] -- true if the tablefilter could be applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addTableFilterParam-String_String_String_String_Object_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTableFilterParam-String_String_String_String_Object_String_sam|trigger=none}{code:language=javascript}
// Best way to call this in a global solution startup method, but filters may be added/removed at any time.
// Note that multiple filters can be added to the same dataprovider, they will all be applied.

// filter on messages table where messagesid>10, the filter has a name so it can be removed using databaseManager.removeTableFilterParam()
var success = databaseManager.addTableFilterParam('admin', 'messages', 'messagesid', '>', 10, 'higNumberedMessagesRule')

// all tables that have the companyid column should be filtered
var success = databaseManager.addTableFilterParam('crm', null, 'companyidid', '=', currentcompanyid)

// some filters with in-conditions
var success = databaseManager.addTableFilterParam('crm', 'products', 'productcode', 'in', [120, 144, 200])
var success = databaseManager.addTableFilterParam('crm', 'orders', 'countrycode', 'in', 'select country code from countries where region = "Europe"')

// you can use modifiers in the operator as well, filter on companies where companyname is null or equals-ignore-case 'servoy'
var success = databaseManager.addTableFilterParam('crm', 'companies', 'companyname', '#^||=', 'servoy')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addTrackingInfo|class=node}{tr:id=name}{td}h6.addTrackingInfo{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addTrackingInfo{span}{span:id=iets|style=float: left;}\(columnName, value){span}{td}{tr}{tr:id=des}{td}{sub-section:addTrackingInfo_des|text=|trigger=button}{sub-section}{sub-section:addTrackingInfo_des|trigger=none|class=sIndent}Add tracking info used in the log table.
When tracking is enabled and a new row is inserted in the log table,
if it has a column named 'columnName', its value will be set with 'value'{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addTrackingInfo_snc|text=|trigger=button}{sub-section}{sub-section:addTrackingInfo_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addTrackingInfo_prs|text=|trigger=button}{sub-section}{sub-section:addTrackingInfo_prs|trigger=none|class=sIndent}\{[String]} columnName -- The name of the column in the log table, used for tracking info
\{[Object]} value -- The value to be set when inserting a new row in the log table, for the 'columnName' column
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addTrackingInfo_ret|text=|trigger=button}{sub-section}{sub-section:addTrackingInfo_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addTrackingInfo_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTrackingInfo_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addTrackingInfo_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTrackingInfo_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addTrackingInfo_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addTrackingInfo_sam|trigger=none}{code:language=javascript}
databaseManager.addTrackingInfo('log_column_name', 'trackingInfo')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=commitTransaction|class=node}{tr:id=name}{td}h6.commitTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}commitTransaction{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:commitTransaction_des|text=|trigger=button}{sub-section}{sub-section:commitTransaction_des|trigger=none|class=sIndent}Returns true if a transaction is committed; rollback if commit fails. 
Saves all edited records and commits the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:commitTransaction_snc|text=|trigger=button}{sub-section}{sub-section:commitTransaction_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:commitTransaction_prs|text=|trigger=button}{sub-section}{sub-section:commitTransaction_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:commitTransaction_ret|text=|trigger=button}{sub-section}{sub-section:commitTransaction_ret|trigger=none|class=sIndent}[Boolean] -- if the transaction could be committed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:commitTransaction_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:commitTransaction_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:commitTransaction_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=commitTransaction-Boolean|class=node}{tr:id=name}{td}h6.commitTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}commitTransaction{span}{span:id=iets|style=float: left;}\(saveFirst){span}{td}{tr}{tr:id=des}{td}{sub-section:commitTransaction-Boolean_des|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_des|trigger=none|class=sIndent}Returns true if a transaction is committed; rollback if commit fails.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:commitTransaction-Boolean_snc|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:commitTransaction-Boolean_prs|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} saveFirst -- save edited records to the database first (default true)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:commitTransaction-Boolean_ret|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_ret|trigger=none|class=sIndent}[Boolean] -- if the transaction could be committed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:commitTransaction-Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:commitTransaction-Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:commitTransaction-Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=commitTransaction-Boolean_Boolean|class=node}{tr:id=name}{td}h6.commitTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}commitTransaction{span}{span:id=iets|style=float: left;}\(saveFirst, revertSavedRecords){span}{td}{tr}{tr:id=des}{td}{sub-section:commitTransaction-Boolean_Boolean_des|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_Boolean_des|trigger=none|class=sIndent}Returns true if a transaction is committed; rollback if commit fails.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:commitTransaction-Boolean_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:commitTransaction-Boolean_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} saveFirst -- save edited records to the database first (default true)\
\{[Boolean]} revertSavedRecords -- if a commit fails and a rollback is done, the when given false the records are not reverted to the database state (and are in edited records again)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:commitTransaction-Boolean_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:commitTransaction-Boolean_Boolean_ret|trigger=none|class=sIndent}[Boolean] -- if the transaction could be committed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:commitTransaction-Boolean_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:commitTransaction-Boolean_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:commitTransaction-Boolean_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:commitTransaction-Boolean_Boolean_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertFoundSet|class=node}{tr:id=name}{td}h6.convertFoundSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertFoundSet{span}{span:id=iets|style=float: left;}\(foundset, related){span}{td}{tr}{tr:id=des}{td}{sub-section:convertFoundSet_des|text=|trigger=button}{sub-section}{sub-section:convertFoundSet_des|trigger=none|class=sIndent}Creates a foundset that combines all the records of the specified one\-to\-many relation seen from the given parent/primary foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:convertFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:convertFoundSet_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to convert.
\{[Object]} related -- can be a one\-to\-many relation object or the name of a one\-to\-many relation
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:convertFoundSet_ret|trigger=none|class=sIndent}[JSFoundSet] -- The converted JSFoundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertFoundSet_sam|trigger=none}{code:language=javascript}
// Convert in the order form a orders foundset into a orderdetails foundset, 
// that has all the orderdetails from all the orders in the foundset.
var convertedFoundSet = databaseManager.convertFoundSet(foundset,order_to_orderdetails);
// or var convertedFoundSet = databaseManager.convertFoundSet(foundset,"order_to_orderdetails");
forms.orderdetails.controller.showRecords(convertedFoundSet);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToDataSet-JSFoundSet|class=node}{tr:id=name}{td}h6.convertToDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertToDataSet{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:convertToDataSet-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertToDataSet-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertToDataSet-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The foundset to be converted.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertToDataSet-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_ret|trigger=none|class=sIndent}[JSDataSet] -- JSDataSet with the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertToDataSet-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertToDataSet-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertToDataSet-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_sam|trigger=none}{code:language=javascript}
// converts a foundset pks to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// converts a foundset to a dataset
//var dataset = databaseManager.convertToDataSet(foundset,['product_id','product_name']);
// converts an object array to a dataset
//var dataset = databaseManager.convertToDataSet(files,['name','path']);
// converts an array to a dataset
//var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
// converts an string list to a dataset
//var dataset = databaseManager.convertToDataSet('4,5,6');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToDataSet-JSFoundSet_StringArray|class=node}{tr:id=name}{td}h6.convertToDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertToDataSet{span}{span:id=iets|style=float: left;}\(foundset, dataproviderNames){span}{td}{tr}{tr:id=des}{td}{sub-section:convertToDataSet-JSFoundSet_StringArray_des|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_StringArray_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_snc|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_prs|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_StringArray_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The foundset to be converted.
\{[String]\[]} dataproviderNames -- Array with column names.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_ret|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-JSFoundSet_StringArray_ret|trigger=none|class=sIndent}[JSDataSet] -- JSDataSet with the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertToDataSet-JSFoundSet_StringArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-JSFoundSet_StringArray_sam|trigger=none}{code:language=javascript}
// converts a foundset pks to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// converts a foundset to a dataset
//var dataset = databaseManager.convertToDataSet(foundset,['product_id','product_name']);
// converts an object array to a dataset
//var dataset = databaseManager.convertToDataSet(files,['name','path']);
// converts an array to a dataset
//var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
// converts an string list to a dataset
//var dataset = databaseManager.convertToDataSet('4,5,6');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToDataSet-ObjectArray|class=node}{tr:id=name}{td}h6.convertToDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertToDataSet{span}{span:id=iets|style=float: left;}\(values){span}{td}{tr}{tr:id=des}{td}{sub-section:convertToDataSet-ObjectArray_des|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertToDataSet-ObjectArray_snc|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertToDataSet-ObjectArray_prs|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_prs|trigger=none|class=sIndent}\{[Object]\[]} values -- The values array.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertToDataSet-ObjectArray_ret|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_ret|trigger=none|class=sIndent}[JSDataSet] -- JSDataSet with the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertToDataSet-ObjectArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertToDataSet-ObjectArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertToDataSet-ObjectArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_sam|trigger=none}{code:language=javascript}
// converts a foundset pks to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// converts a foundset to a dataset
//var dataset = databaseManager.convertToDataSet(foundset,['product_id','product_name']);
// converts an object array to a dataset
//var dataset = databaseManager.convertToDataSet(files,['name','path']);
// converts an array to a dataset
//var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
// converts an string list to a dataset
//var dataset = databaseManager.convertToDataSet('4,5,6');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToDataSet-ObjectArray_StringArray|class=node}{tr:id=name}{td}h6.convertToDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertToDataSet{span}{span:id=iets|style=float: left;}\(values, dataproviderNames){span}{td}{tr}{tr:id=des}{td}{sub-section:convertToDataSet-ObjectArray_StringArray_des|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_StringArray_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertToDataSet-ObjectArray_StringArray_snc|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertToDataSet-ObjectArray_StringArray_prs|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_StringArray_prs|trigger=none|class=sIndent}\{[Object]\[]} values -- The values array.
\{[String]\[]} dataproviderNames -- The property names array.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertToDataSet-ObjectArray_StringArray_ret|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-ObjectArray_StringArray_ret|trigger=none|class=sIndent}[JSDataSet] -- JSDataSet with the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertToDataSet-ObjectArray_StringArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertToDataSet-ObjectArray_StringArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertToDataSet-ObjectArray_StringArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-ObjectArray_StringArray_sam|trigger=none}{code:language=javascript}
// converts a foundset pks to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// converts a foundset to a dataset
//var dataset = databaseManager.convertToDataSet(foundset,['product_id','product_name']);
// converts an object array to a dataset
//var dataset = databaseManager.convertToDataSet(files,['name','path']);
// converts an array to a dataset
//var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
// converts an string list to a dataset
//var dataset = databaseManager.convertToDataSet('4,5,6');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertToDataSet-String|class=node}{tr:id=name}{td}h6.convertToDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}convertToDataSet{span}{span:id=iets|style=float: left;}\(ids){span}{td}{tr}{tr:id=des}{td}{sub-section:convertToDataSet-String_des|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-String_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:convertToDataSet-String_snc|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertToDataSet-String_prs|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-String_prs|trigger=none|class=sIndent}\{[String]} ids -- Concatenated values to be put into dataset.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertToDataSet-String_ret|text=|trigger=button}{sub-section}{sub-section:convertToDataSet-String_ret|trigger=none|class=sIndent}[JSDataSet] -- JSDataSet with the data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertToDataSet-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertToDataSet-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertToDataSet-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:convertToDataSet-String_sam|trigger=none}{code:language=javascript}
// converts a foundset pks to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// converts a foundset to a dataset
//var dataset = databaseManager.convertToDataSet(foundset,['product_id','product_name']);
// converts an object array to a dataset
//var dataset = databaseManager.convertToDataSet(files,['name','path']);
// converts an array to a dataset
//var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
// converts an string list to a dataset
//var dataset = databaseManager.convertToDataSet('4,5,6');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=copyMatchingFields-Object_JSRecord|class=node}{tr:id=name}{td}h6.copyMatchingFields{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}copyMatchingFields{span}{span:id=iets|style=float: left;}\(source, destination){span}{td}{tr}{tr:id=des}{td}{sub-section:copyMatchingFields-Object_JSRecord_des|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_des|trigger=none|class=sIndent}Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).
returns true if no error did happen.

NOTE: This function could be used to store a copy of records in an archive table. Use the getRecord() function to get the record as an object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:copyMatchingFields-Object_JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:copyMatchingFields-Object_JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_prs|trigger=none|class=sIndent}\{[Object]} source -- The source record or object to be copied.
\{[JSRecord]} destination -- The destination record to copy to.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:copyMatchingFields-Object_JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if no errors happened.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:copyMatchingFields-Object_JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:copyMatchingFields-Object_JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:copyMatchingFields-Object_JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_sam|trigger=none}{code:language=javascript}
for( var i = 1 ; i <= foundset.getSize() ; i++ )
{
	var srcRecord = foundset.getRecord(i);
	var destRecord = otherfoundset.getRecord(i);
	if (srcRecord == null || destRecord == null) break;
	databaseManager.copyMatchingFields(srcRecord,destRecord,true)
}
//saves any outstanding changes to the dest foundset
controller.saveData();

//copying from a MailMessage JavaScript object
//var _msg = plugins.mail.receiveMail(login, password, true, 0, null, properties);
//if (_msg != null)
//{
//	controller.newRecord();
//	var srcObject = _msg[0];
//	var destRecord = foundset.getSelectedRecord();
//	databaseManager.copyMatchingFields(srcObject, destRecord, true);
//	controller.saveData();
//}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=copyMatchingFields-Object_JSRecord_Boolean|class=node}{tr:id=name}{td}h6.copyMatchingFields{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}copyMatchingFields{span}{span:id=iets|style=float: left;}\(source, destination, overwrite){span}{td}{tr}{tr:id=des}{td}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_des|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_des|trigger=none|class=sIndent}Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).
returns true if no error did happen.

NOTE: This function could be used to store a copy of records in an archive table. Use the getRecord() function to get the record as an object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_prs|trigger=none|class=sIndent}\{[Object]} source -- The source record or object to be copied.
\{[JSRecord]} destination -- The destination record to copy to.
\{[Boolean]} overwrite -- Boolean values to overwrite all values.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_ret|trigger=none|class=sIndent}[Boolean] -- true if no errors happened.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:copyMatchingFields-Object_JSRecord_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_Boolean_sam|trigger=none}{code:language=javascript}
for( var i = 1 ; i <= foundset.getSize() ; i++ )
{
	var srcRecord = foundset.getRecord(i);
	var destRecord = otherfoundset.getRecord(i);
	if (srcRecord == null || destRecord == null) break;
	databaseManager.copyMatchingFields(srcRecord,destRecord,true)
}
//saves any outstanding changes to the dest foundset
controller.saveData();

//copying from a MailMessage JavaScript object
//var _msg = plugins.mail.receiveMail(login, password, true, 0, null, properties);
//if (_msg != null)
//{
//	controller.newRecord();
//	var srcObject = _msg[0];
//	var destRecord = foundset.getSelectedRecord();
//	databaseManager.copyMatchingFields(srcObject, destRecord, true);
//	controller.saveData();
//}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=copyMatchingFields-Object_JSRecord_StringArray|class=node}{tr:id=name}{td}h6.copyMatchingFields{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}copyMatchingFields{span}{span:id=iets|style=float: left;}\(source, destination, names){span}{td}{tr}{tr:id=des}{td}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_des|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_des|trigger=none|class=sIndent}Copies all matching non empty columns (if overwrite boolean is given all columns except pk/ident, if array then all columns except pk and array names).
returns true if no error did happen.

NOTE: This function could be used to store a copy of records in an archive table. Use the getRecord() function to get the record as an object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_snc|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_prs|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_prs|trigger=none|class=sIndent}\{[Object]} source -- The source record or object to be copied.
\{[JSRecord]} destination -- The destination record to copy to.
\{[String]\[]} names -- The property names that shouldn't be overriden.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_ret|text=|trigger=button}{sub-section}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_ret|trigger=none|class=sIndent}[Boolean] -- true if no errors happened.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:copyMatchingFields-Object_JSRecord_StringArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:copyMatchingFields-Object_JSRecord_StringArray_sam|trigger=none}{code:language=javascript}
for( var i = 1 ; i <= foundset.getSize() ; i++ )
{
	var srcRecord = foundset.getRecord(i);
	var destRecord = otherfoundset.getRecord(i);
	if (srcRecord == null || destRecord == null) break;
	databaseManager.copyMatchingFields(srcRecord,destRecord,true)
}
//saves any outstanding changes to the dest foundset
controller.saveData();

//copying from a MailMessage JavaScript object
//var _msg = plugins.mail.receiveMail(login, password, true, 0, null, properties);
//if (_msg != null)
//{
//	controller.newRecord();
//	var srcObject = _msg[0];
//	var destRecord = foundset.getSelectedRecord();
//	databaseManager.copyMatchingFields(srcObject, destRecord, true);
//	controller.saveData();
//}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createDataSourceByQuery-String_QBSelect_Number|class=node}{tr:id=name}{td}h6.createDataSourceByQuery{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createDataSourceByQuery{span}{span:id=iets|style=float: left;}\(name, query, max_returned_rows){span}{td}{tr}{tr:id=des}{td}{sub-section:createDataSourceByQuery-String_QBSelect_Number_des|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_QBSelect_Number_des|trigger=none|class=sIndent}Performs a query on the specified server, saves the the result in a datasource.
Will throw an exception if anything went wrong when executing the query.
Column types in the datasource are inferred from the query result.

<br>Table filters on the involved tables in the query are applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_snc|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_QBSelect_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_prs|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_QBSelect_Number_prs|trigger=none|class=sIndent}\{[String]} name -- data source name
\{[QBSelect]} query -- The query builder to be executed.
\{[Number]} max_returned_rows -- The maximum number of rows returned by the query.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_ret|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_QBSelect_Number_ret|trigger=none|class=sIndent}[String] -- datasource containing the results of the query or null if the parameters are wrong.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_QBSelect_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_QBSelect_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createDataSourceByQuery-String_QBSelect_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_QBSelect_Number_sam|trigger=none}{code:language=javascript}
// select customer data for order 1234
/** @type {QBSelect<db:/example_data/customers>} */
var q = databaseManager.createSelect("db:/example_data/customers")
q.result.add(q.columns.address).add(q.columns.city).add(q.columns.country)
q.where.add(q.joins.customers_to_orders.columns.orderid.eq(1234))
var uri = databaseManager.createDataSourceByQuery('mydata', q, 999); // the uri can be used to create a form using solution model

// the uri can be used to create a form using solution model
var myForm = solutionModel.newForm('newForm', uri, 'myStyleName', false, 800, 600)
myForm.newTextField('city', 140, 20, 140,20)

// the uri can be used to acces a foundset directly
var fs = databaseManager.getFoundSet(uri)
fs.loadAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createDataSourceByQuery-String_String_String_ObjectArray_Number|class=node}{tr:id=name}{td}h6.createDataSourceByQuery{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createDataSourceByQuery{span}{span:id=iets|style=float: left;}\(name, server_name, sql_query, arguments, max_returned_rows){span}{td}{tr}{tr:id=des}{td}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_des|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_des|trigger=none|class=sIndent}Performs a sql query on the specified server, saves the the result in a datasource.
Will throw an exception if anything went wrong when executing the query.
Column types in the datasource are inferred from the query result.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_snc|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_prs|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_prs|trigger=none|class=sIndent}\{[String]} name -- data source name
\{[String]} server_name -- The name of the server where the query should be executed.
\{[String]} sql_query -- The custom sql.
\{[Object]\[]} arguments -- Specified arguments or null if there are no arguments.
\{[Number]} max_returned_rows -- The maximum number of rows returned by the query.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_ret|text=|trigger=button}{sub-section}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_ret|trigger=none|class=sIndent}[String] -- datasource containing the results of the query or null if the parameters are wrong.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createDataSourceByQuery-String_String_String_ObjectArray_Number_sam|trigger=none}{code:language=javascript}
var query = 'select address, city, country  from customers';
var uri = databaseManager.createDataSourceByQuery('mydata', 'example_data', query, null, 999);

// the uri can be used to create a form using solution model
var myForm = solutionModel.newForm('newForm', uri, 'myStyleName', false, 800, 600)
myForm.newTextField('city', 140, 20, 140,20)

// the uri can be used to acces a foundset directly
var fs = databaseManager.getFoundSet(uri)
fs.loadAllRecords();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createEmptyDataSet|class=node}{tr:id=name}{td}h6.createEmptyDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}createEmptyDataSet{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:createEmptyDataSet_des|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet_des|trigger=none|class=sIndent}Returns an empty dataset object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createEmptyDataSet_snc|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet_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:createEmptyDataSet_prs|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:createEmptyDataSet_ret|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet_ret|trigger=none|class=sIndent}[JSDataSet] -- An empty JSDataSet with the initial sizes.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createEmptyDataSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createEmptyDataSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createEmptyDataSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet_sam|trigger=none}{code:language=javascript}
// gets an empty dataset with a specifed row and column count
var dataset = databaseManager.createEmptyDataSet(10,10)
// gets an empty dataset with a specifed row count and column array
var dataset2 = databaseManager.createEmptyDataSet(10,new Array ('a','b','c','d'))
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createEmptyDataSet-Number_Number|class=node}{tr:id=name}{td}h6.createEmptyDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}createEmptyDataSet{span}{span:id=iets|style=float: left;}\(rowCount, columnCount){span}{td}{tr}{tr:id=des}{td}{sub-section:createEmptyDataSet-Number_Number_des|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_Number_des|trigger=none|class=sIndent}Returns an empty dataset object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createEmptyDataSet-Number_Number_snc|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createEmptyDataSet-Number_Number_prs|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_Number_prs|trigger=none|class=sIndent}\{[Number]} rowCount -- The number of rows in the DataSet object.
\{[Number]} columnCount -- Number of columns.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createEmptyDataSet-Number_Number_ret|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_Number_ret|trigger=none|class=sIndent}[JSDataSet] -- An empty JSDataSet with the initial sizes.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createEmptyDataSet-Number_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createEmptyDataSet-Number_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createEmptyDataSet-Number_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_Number_sam|trigger=none}{code:language=javascript}
// gets an empty dataset with a specifed row and column count
var dataset = databaseManager.createEmptyDataSet(10,10)
// gets an empty dataset with a specifed row count and column array
var dataset2 = databaseManager.createEmptyDataSet(10,new Array ('a','b','c','d'))
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createEmptyDataSet-Number_StringArray|class=node}{tr:id=name}{td}h6.createEmptyDataSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}createEmptyDataSet{span}{span:id=iets|style=float: left;}\(rowCount, columnNames){span}{td}{tr}{tr:id=des}{td}{sub-section:createEmptyDataSet-Number_StringArray_des|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_StringArray_des|trigger=none|class=sIndent}Returns an empty dataset object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createEmptyDataSet-Number_StringArray_snc|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createEmptyDataSet-Number_StringArray_prs|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_StringArray_prs|trigger=none|class=sIndent}\{[Number]} rowCount
\{[String]\[]} columnNames
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createEmptyDataSet-Number_StringArray_ret|text=|trigger=button}{sub-section}{sub-section:createEmptyDataSet-Number_StringArray_ret|trigger=none|class=sIndent}[JSDataSet] -- An empty JSDataSet with the initial sizes.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createEmptyDataSet-Number_StringArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createEmptyDataSet-Number_StringArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createEmptyDataSet-Number_StringArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createEmptyDataSet-Number_StringArray_sam|trigger=none}{code:language=javascript}
// gets an empty dataset with a specifed row and column count
var dataset = databaseManager.createEmptyDataSet(10,10)
// gets an empty dataset with a specifed row count and column array
var dataset2 = databaseManager.createEmptyDataSet(10,new Array ('a','b','c','d'))
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createSelect|class=node}{tr:id=name}{td}h6.createSelect{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[QBSelect]{span}{span:id=iets|style=float: left; font-weight: bold;}createSelect{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:createSelect_des|text=|trigger=button}{sub-section}{sub-section:createSelect_des|trigger=none|class=sIndent}Create a QueryBuilder object for a datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createSelect_snc|text=|trigger=button}{sub-section}{sub-section:createSelect_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createSelect_prs|text=|trigger=button}{sub-section}{sub-section:createSelect_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The data source to build a query for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createSelect_ret|text=|trigger=button}{sub-section}{sub-section:createSelect_ret|trigger=none|class=sIndent}[QBSelect] -- query builder{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createSelect_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createSelect_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createSelect_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createSelect_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createSelect_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:createSelect_sam|trigger=none}{code:language=javascript}
var q = databaseManager.createSelect('db:/example_data/book_nodes')
q.result.addPk()
q.where.add(q.columns.label_text.not.isin(null))
databaseManager.getFoundSet('db:/example_data/book_nodes').loadRecords(q)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=dataSourceExists|class=node}{tr:id=name}{td}h6.dataSourceExists{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}dataSourceExists{span}{span:id=iets|style=float: left;}\(datasource){span}{td}{tr}{tr:id=des}{td}{sub-section:dataSourceExists_des|text=|trigger=button}{sub-section}{sub-section:dataSourceExists_des|trigger=none|class=sIndent}Check wether a data source exists. This function can be used for any type of data source (db\-based, in\-memory).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:dataSourceExists_snc|text=|trigger=button}{sub-section}{sub-section:dataSourceExists_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:dataSourceExists_prs|text=|trigger=button}{sub-section}{sub-section:dataSourceExists_prs|trigger=none|class=sIndent}datasource
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:dataSourceExists_ret|text=|trigger=button}{sub-section}{sub-section:dataSourceExists_ret|trigger=none|class=sIndent}[Boolean] -- boolean exists{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:dataSourceExists_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSourceExists_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:dataSourceExists_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSourceExists_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:dataSourceExists_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSourceExists_sam|trigger=none}{code:language=javascript}
if (!databaseManager.dataSourceExists(dataSource))
{
   // does not exist
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAutoSave|class=node}{tr:id=name}{td}h6.getAutoSave{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}getAutoSave{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getAutoSave_des|text=|trigger=button}{sub-section}{sub-section:getAutoSave_des|trigger=none|class=sIndent}Returns true or false if autosave is enabled or disabled.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAutoSave_snc|text=|trigger=button}{sub-section}{sub-section:getAutoSave_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:getAutoSave_prs|text=|trigger=button}{sub-section}{sub-section:getAutoSave_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getAutoSave_ret|text=|trigger=button}{sub-section}{sub-section:getAutoSave_ret|trigger=none|class=sIndent}[Boolean] -- true if autosave if enabled.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAutoSave_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getAutoSave_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAutoSave_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getAutoSave_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAutoSave_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getAutoSave_sam|trigger=none}{code:language=javascript}
//Set autosave, if false then no saves will happen by the ui (not including deletes!). Until you call saveData or setAutoSave(true)
//Rollbacks in mem the records that were edited and not yet saved. Best used in combination with autosave false.
databaseManager.setAutoSave(false)
//Now let users input data

//On save or cancel, when data has been entered:
if (cancel) databaseManager.rollbackEditedRecords()
databaseManager.setAutoSave(true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSetByQuery-QBSelect_Number|class=node}{tr:id=name}{td}h6.getDataSetByQuery{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSetByQuery{span}{span:id=iets|style=float: left;}\(query, max_returned_rows){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSetByQuery-QBSelect_Number_des|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-QBSelect_Number_des|trigger=none|class=sIndent}Performs a sql query with a query builder object.
Will throw an exception if anything did go wrong when executing the query.

<br>Table filters on the involved tables in the query are applied.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSetByQuery-QBSelect_Number_snc|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-QBSelect_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSetByQuery-QBSelect_Number_prs|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-QBSelect_Number_prs|trigger=none|class=sIndent}\{[QBSelect]} query -- QBSelect query.
\{[Number]} max_returned_rows -- The maximum number of rows returned by the query.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSetByQuery-QBSelect_Number_ret|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-QBSelect_Number_ret|trigger=none|class=sIndent}[JSDataSet] -- The JSDataSet containing the results of the query.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSetByQuery-QBSelect_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-QBSelect_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSetByQuery-QBSelect_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-QBSelect_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSetByQuery-QBSelect_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-QBSelect_Number_sam|trigger=none}{code:language=javascript}
// use the query froma foundset and add a condition
/** @type {QBSelect<db:/example_data/orders>} */
var q = foundset.getQuery()
q.where.add(q.joins.orders_to_order_details.columns.discount.eq(2))
var maxReturnedRows = 10;//useful to limit number of rows
var ds = databaseManager.getDataSetByQuery(q, maxReturnedRows);

// query: select PK from example.book_nodes where parent = 111 and(note_date is null or note_date > now)
/** @type {QBSelect<db:/example_data/book_nodes>} */
var query = databaseManager.createSelect('db:/example_data/book_nodes').result.addPk().root
query.where.add(query.columns.parent_id.eq(111))
	.add(query.or
	.add(query.columns.note_date.isNull)
	.add(query.columns.note_date.gt(new Date())))
databaseManager.getDataSetByQuery(q, max_returned_rows)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSetByQuery-String_String_ObjectArray_Number|class=node}{tr:id=name}{td}h6.getDataSetByQuery{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSetByQuery{span}{span:id=iets|style=float: left;}\(server_name, sql_query, arguments, max_returned_rows){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_des|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_des|trigger=none|class=sIndent}Performs a sql query on the specified server, returns the result in a dataset.
Will throw an exception if anything did go wrong when executing the query.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_snc|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_prs|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_prs|trigger=none|class=sIndent}\{[String]} server_name -- The name of the server where the query should be executed.
\{[String]} sql_query -- The custom sql.
\{[Object]\[]} arguments -- Specified arguments or null if there are no arguments.
\{[Number]} max_returned_rows -- The maximum number of rows returned by the query.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_ret|text=|trigger=button}{sub-section}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_ret|trigger=none|class=sIndent}[JSDataSet] -- The JSDataSet containing the results of the query.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSetByQuery-String_String_ObjectArray_Number_sam|trigger=none}{code:language=javascript}
//finds duplicate records in a specified foundset
var vQuery =" SELECT companiesid from companies where company_name IN (SELECT company_name from companies group bycompany_name having count(company_name)>1 )";
var vDataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), vQuery, null, 1000);
controller.loadRecords(vDataset);

var maxReturnedRows = 10;//useful to limit number of rows
var query = 'select c1,c2,c3 from test_table where start_date = ?';//do not use '.' or special chars in names or aliases if you want to access data by name
var args = new Array();
args[0] = order_date //or  new Date()
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, args, maxReturnedRows);

// place in label: 
// elements.myLabel.text = '<html>'+dataset.getAsHTML()+'</html>';

//example to calc a strange total
global_total = 0;
for( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )
{
	dataset.rowIndex = i;
	global_total = global_total + dataset.c1 + dataset.getValue(i,3);
}
//example to assign to dataprovider
//employee_salary = dataset.getValue(row,column)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSourceServerName|class=node}{tr:id=name}{td}h6.getDataSourceServerName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSourceServerName{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSourceServerName_des|text=|trigger=button}{sub-section}{sub-section:getDataSourceServerName_des|trigger=none|class=sIndent}Returns the server name from the datasource, or null if not a database datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSourceServerName_snc|text=|trigger=button}{sub-section}{sub-section:getDataSourceServerName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSourceServerName_prs|text=|trigger=button}{sub-section}{sub-section:getDataSourceServerName_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The datasource string to get the server name from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSourceServerName_ret|text=|trigger=button}{sub-section}{sub-section:getDataSourceServerName_ret|trigger=none|class=sIndent}[String] -- The servername of the datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSourceServerName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceServerName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSourceServerName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceServerName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSourceServerName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceServerName_sam|trigger=none}{code:language=javascript}
var servername = databaseManager.getDataSourceServerName(datasource);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSourceTableName|class=node}{tr:id=name}{td}h6.getDataSourceTableName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSourceTableName{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataSourceTableName_des|text=|trigger=button}{sub-section}{sub-section:getDataSourceTableName_des|trigger=none|class=sIndent}Returns the table name from the datasource, or null if not a database datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataSourceTableName_snc|text=|trigger=button}{sub-section}{sub-section:getDataSourceTableName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataSourceTableName_prs|text=|trigger=button}{sub-section}{sub-section:getDataSourceTableName_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The datasource string to get the tablename from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataSourceTableName_ret|text=|trigger=button}{sub-section}{sub-section:getDataSourceTableName_ret|trigger=none|class=sIndent}[String] -- The tablename of the datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataSourceTableName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceTableName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataSourceTableName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceTableName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSourceTableName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataSourceTableName_sam|trigger=none}{code:language=javascript}
var tablename = databaseManager.getDataSourceTableName(datasource);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDatabaseProductName|class=node}{tr:id=name}{td}h6.getDatabaseProductName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDatabaseProductName{span}{span:id=iets|style=float: left;}\(serverName){span}{td}{tr}{tr:id=des}{td}{sub-section:getDatabaseProductName_des|text=|trigger=button}{sub-section}{sub-section:getDatabaseProductName_des|trigger=none|class=sIndent}Returns the database product name as supplied by the driver for a server.

NOTE: For more detail on named server connections, see the chapter on Database Connections, beginning with the Introduction to database connections in the Servoy Developer User's Guide.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDatabaseProductName_snc|text=|trigger=button}{sub-section}{sub-section:getDatabaseProductName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDatabaseProductName_prs|text=|trigger=button}{sub-section}{sub-section:getDatabaseProductName_prs|trigger=none|class=sIndent}\{[String]} serverName -- The specified name of the database server connection.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDatabaseProductName_ret|text=|trigger=button}{sub-section}{sub-section:getDatabaseProductName_ret|trigger=none|class=sIndent}[String] -- A database product name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDatabaseProductName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDatabaseProductName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDatabaseProductName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDatabaseProductName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDatabaseProductName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDatabaseProductName_sam|trigger=none}{code:language=javascript}
var databaseProductName = databaseManager.getDatabaseProductName(servername)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getEditedRecords|class=node}{tr:id=name}{td}h6.getEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getEditedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getEditedRecords_des|text=|trigger=button}{sub-section}{sub-section:getEditedRecords_des|trigger=none|class=sIndent}Returns an array of edited records with outstanding (unsaved) data. 

NOTE: To return a dataset of outstanding (unsaved) edited data for each record, see JSRecord.getChangedData();
NOTE2: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getEditedRecords_snc|text=|trigger=button}{sub-section}{sub-section:getEditedRecords_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:getEditedRecords_prs|text=|trigger=button}{sub-section}{sub-section:getEditedRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getEditedRecords_ret|text=|trigger=button}{sub-section}{sub-section:getEditedRecords_ret|trigger=none|class=sIndent}[JSRecord]\[] -- Array of outstanding/unsaved JSRecords.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getEditedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getEditedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getEditedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords_sam|trigger=none}{code:language=javascript}
//This method can be used to loop through all outstanding changes,
//the application.output line contains all the changed data, their tablename and primary key
var editr = databaseManager.getEditedRecords()
for (x=0;x<editr.length;x++)
{
	var ds = editr[x].getChangedData();
	var jstable = databaseManager.getTable(editr[x]);
	var tableSQLName = jstable.getSQLName();
	var pkrec = jstable.getRowIdentifierColumnNames().join(',');
	var pkvals = new Array();
	for (var j = 0; j < jstable.getRowIdentifierColumnNames().length; j++)
	{
		pkvals[j] = editr[x][jstable.getRowIdentifierColumnNames()[j]];
	}
	application.output('Table: '+tableSQLName +', PKs: '+ pkvals.join(',') +' ('+pkrec +')');
	// Get a dataset with outstanding changes on a record
	for( var i = 1 ; i <= ds.getMaxRowIndex() ; i++ )
	{
		application.output('Column: '+ ds.getValue(i,1) +', oldValue: '+ ds.getValue(i,2) +', newValue: '+ ds.getValue(i,3));
	}
}
//in most cases you will want to set autoSave back on now
databaseManager.setAutoSave(true);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getEditedRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.getEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getEditedRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getEditedRecords-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:getEditedRecords-JSFoundSet_des|trigger=none|class=sIndent}Returns an array of edited records with outstanding (unsaved) data. 

NOTE: To return a dataset of outstanding (unsaved) edited data for each record, see JSRecord.getChangedData();
NOTE2: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getEditedRecords-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:getEditedRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getEditedRecords-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:getEditedRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- return edited records in the foundset only.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getEditedRecords-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:getEditedRecords-JSFoundSet_ret|trigger=none|class=sIndent}[JSRecord]\[] -- Array of outstanding/unsaved JSRecords.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getEditedRecords-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getEditedRecords-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getEditedRecords-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getEditedRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
//This method can be used to loop through all outstanding changes in a foundset,
//the application.output line contains all the changed data, their tablename and primary key
var editr = databaseManager.getEditedRecords(foundset)
for (x=0;x<editr.length;x++)
{
	var ds = editr[x].getChangedData();
	var jstable = databaseManager.getTable(editr[x]);
	var tableSQLName = jstable.getSQLName();
	var pkrec = jstable.getRowIdentifierColumnNames().join(',');
	var pkvals = new Array();
	for (var j = 0; j < jstable.getRowIdentifierColumnNames().length; j++)
	{
		pkvals[j] = editr[x][jstable.getRowIdentifierColumnNames()[j]];
	}
	application.output('Table: '+tableSQLName +', PKs: '+ pkvals.join(',') +' ('+pkrec +')');
	// Get a dataset with outstanding changes on a record
	for( var i = 1 ; i <= ds.getMaxRowIndex() ; i++ )
	{
		application.output('Column: '+ ds.getValue(i,1) +', oldValue: '+ ds.getValue(i,2) +', newValue: '+ ds.getValue(i,3));
	}
}
databaseManager.saveData(foundset);//save all records from foundset
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFailedRecords|class=node}{tr:id=name}{td}h6.getFailedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getFailedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getFailedRecords_des|text=|trigger=button}{sub-section}{sub-section:getFailedRecords_des|trigger=none|class=sIndent}Returns an array of records that fail after a save.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFailedRecords_snc|text=|trigger=button}{sub-section}{sub-section:getFailedRecords_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:getFailedRecords_prs|text=|trigger=button}{sub-section}{sub-section:getFailedRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getFailedRecords_ret|text=|trigger=button}{sub-section}{sub-section:getFailedRecords_ret|trigger=none|class=sIndent}[JSRecord]\[] -- Array of failed JSRecords{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFailedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFailedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFailedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords_sam|trigger=none}{code:language=javascript}
var array = databaseManager.getFailedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
	var record = array[i];
	application.output(record.exception);
	if (record.exception.getErrorCode() == ServoyException.RECORD_VALIDATION_FAILED)
	{
		// exception thrown in pre-insert/update/delete event method
		var thrown = record.exception.getValue()
		application.output("Record validation failed: "+thrown)
	}
	// find out the table of the record (similar to getEditedRecords)
	var jstable = databaseManager.getTable(record);
	var tableSQLName = jstable.getSQLName();
	application.output('Table:'+tableSQLName+' in server:'+jstable.getServerName()+' failed to save.')
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFailedRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.getFailedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRecord]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getFailedRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getFailedRecords-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:getFailedRecords-JSFoundSet_des|trigger=none|class=sIndent}Returns an array of records that fail after a save.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFailedRecords-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:getFailedRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFailedRecords-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:getFailedRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- return failed records in the foundset only.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFailedRecords-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:getFailedRecords-JSFoundSet_ret|trigger=none|class=sIndent}[JSRecord]\[] -- Array of failed JSRecords{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFailedRecords-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFailedRecords-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFailedRecords-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFailedRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
var array = databaseManager.getFailedRecords(foundset)
for( var i = 0 ; i < array.length ; i++ )
{
	var record = array[i];
	application.output(record.exception);
	if (record.exception.getErrorCode() == ServoyException.RECORD_VALIDATION_FAILED)
	{
		// exception thrown in pre-insert/update/delete event method
		var thrown = record.exception.getValue()
		application.output("Record validation failed: "+thrown)
	}
	// find out the table of the record (similar to getEditedRecords)
	var jstable = databaseManager.getTable(record);
	var tableSQLName = jstable.getSQLName();
	application.output('Table:'+tableSQLName+' in server:'+jstable.getServerName()+' failed to save.')
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFoundSet-QBSelect|class=node}{tr:id=name}{td}h6.getFoundSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSet{span}{span:id=iets|style=float: left;}\(query){span}{td}{tr}{tr:id=des}{td}{sub-section:getFoundSet-QBSelect_des|text=|trigger=button}{sub-section}{sub-section:getFoundSet-QBSelect_des|trigger=none|class=sIndent}Returns a foundset object for a specified pk query.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFoundSet-QBSelect_snc|text=|trigger=button}{sub-section}{sub-section:getFoundSet-QBSelect_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSet-QBSelect_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSet-QBSelect_prs|trigger=none|class=sIndent}\{[QBSelect]} query -- The query to get the JSFoundset for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFoundSet-QBSelect_ret|text=|trigger=button}{sub-section}{sub-section:getFoundSet-QBSelect_ret|trigger=none|class=sIndent}[JSFoundSet] -- A new JSFoundset for that query.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFoundSet-QBSelect_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-QBSelect_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFoundSet-QBSelect_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-QBSelect_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFoundSet-QBSelect_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-QBSelect_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFoundSet-String|class=node}{tr:id=name}{td}h6.getFoundSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSet{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:getFoundSet-String_des|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_des|trigger=none|class=sIndent}Returns a foundset object for a specified datasource or server and tablename.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFoundSet-String_snc|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSet-String_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The datasource to get a JSFoundset for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFoundSet-String_ret|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_ret|trigger=none|class=sIndent}[JSFoundSet] -- A new JSFoundset for that datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFoundSet-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFoundSet-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFoundSet-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_sam|trigger=none}{code:language=javascript}
// type the foundset returned from the call with JSDoc, fill in the right server/tablename
/** @type {JSFoundset<db:/servername/tablename>} */
var fs = databaseManager.getFoundSet(controller.getDataSource())
var ridx = fs.newRecord()
var record = fs.getRecord(ridx)
record.emp_name = 'John'
databaseManager.saveData()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFoundSet-String_String|class=node}{tr:id=name}{td}h6.getFoundSet{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSet{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:getFoundSet-String_String_des|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_String_des|trigger=none|class=sIndent}Returns a foundset object for a specified datasource or server and tablename.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFoundSet-String_String_snc|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSet-String_String_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_String_prs|trigger=none|class=sIndent}\{[String]} serverName -- The servername to get a JSFoundset for.
\{[String]} tableName -- The tablename for that server
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFoundSet-String_String_ret|text=|trigger=button}{sub-section}{sub-section:getFoundSet-String_String_ret|trigger=none|class=sIndent}[JSFoundSet] -- A new JSFoundset for that datasource.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFoundSet-String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFoundSet-String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFoundSet-String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSet-String_String_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript}

{code}{builder-show}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFoundSetCount|class=node}{tr:id=name}{td}h6.getFoundSetCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSetCount{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getFoundSetCount_des|text=|trigger=button}{sub-section}{sub-section:getFoundSetCount_des|trigger=none|class=sIndent}Returns the total number of records in a foundset.

NOTE: This can be an expensive operation (time\-wise) if your resultset is large.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFoundSetCount_snc|text=|trigger=button}{sub-section}{sub-section:getFoundSetCount_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSetCount_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSetCount_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to get the count for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFoundSetCount_ret|text=|trigger=button}{sub-section}{sub-section:getFoundSetCount_ret|trigger=none|class=sIndent}[Number] -- the foundset count{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFoundSetCount_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFoundSetCount_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFoundSetCount_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetCount_sam|trigger=none}{code:language=javascript}
//return the total number of records in a foundset.
databaseManager.getFoundSetCount(foundset);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFoundSetUpdater|class=node}{tr:id=name}{td}h6.getFoundSetUpdater{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSFoundSetUpdater]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSetUpdater{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getFoundSetUpdater_des|text=|trigger=button}{sub-section}{sub-section:getFoundSetUpdater_des|trigger=none|class=sIndent}Returns a JSFoundsetUpdater object that can be used to update all or a specific number of rows in the specified foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getFoundSetUpdater_snc|text=|trigger=button}{sub-section}{sub-section:getFoundSetUpdater_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getFoundSetUpdater_prs|text=|trigger=button}{sub-section}{sub-section:getFoundSetUpdater_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The foundset to update.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getFoundSetUpdater_ret|text=|trigger=button}{sub-section}{sub-section:getFoundSetUpdater_ret|trigger=none|class=sIndent}[JSFoundSetUpdater] -- The JSFoundsetUpdater for the specified JSFoundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getFoundSetUpdater_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetUpdater_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getFoundSetUpdater_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetUpdater_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getFoundSetUpdater_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getFoundSetUpdater_sam|trigger=none}{code:language=javascript}
//1) update entire foundset
var fsUpdater = databaseManager.getFoundSetUpdater(foundset)
fsUpdater.setColumn('customer_type',1)
fsUpdater.setColumn('my_flag',0)
fsUpdater.performUpdate()

//2) update part of foundset, for example the first 4 row (starts with selected row)
var fsUpdater = databaseManager.getFoundSetUpdater(foundset)
fsUpdater.setColumn('customer_type',new Array(1,2,3,4))
fsUpdater.setColumn('my_flag',new Array(1,0,1,0))
fsUpdater.performUpdate()

//3) safely loop through foundset (starts with selected row)
controller.setSelectedIndex(1)
var count = 0
var fsUpdater = databaseManager.getFoundSetUpdater(foundset)
while(fsUpdater.next())
{
	fsUpdater.setColumn('my_flag',count++)
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getNextSequence-String_String|class=node}{tr:id=name}{td}h6.getNextSequence{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getNextSequence{span}{span:id=iets|style=float: left;}\(dataSource, columnName){span}{td}{tr}{tr:id=des}{td}{sub-section:getNextSequence-String_String_des|text=|trigger=button}{sub-section}{sub-section:getNextSequence-String_String_des|trigger=none|class=sIndent}Gets the next sequence for a column which has a sequence defined in its column dataprovider properties.

NOTE: For more infomation on configuring the sequence for a column, see the section Auto enter options for a column from the Dataproviders chapter in the Servoy Developer User's Guide.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getNextSequence-String_String_snc|text=|trigger=button}{sub-section}{sub-section:getNextSequence-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getNextSequence-String_String_prs|text=|trigger=button}{sub-section}{sub-section:getNextSequence-String_String_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The datasource that points to the table which has the column with the sequence,
								or the name of the server where the table can be found. If the name of the server
								is specified, then a second optional parameter specifying the name of the table
								must be used. If the datasource is specified, then the name of the table is not needed
								as the second argument.
\{[String]} columnName -- The name of the column that has a sequence defined in its properties.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getNextSequence-String_String_ret|text=|trigger=button}{sub-section}{sub-section:getNextSequence-String_String_ret|trigger=none|class=sIndent}[Object] -- The next sequence for the column, null if there was no sequence for that column 
        or if there is no column with the given name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getNextSequence-String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNextSequence-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getNextSequence-String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNextSequence-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getNextSequence-String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getNextSequence-String_String_sam|trigger=none}{code:language=javascript}
var seqDataSource = forms.seq_table.controller.getDataSource();
var nextValue = databaseManager.getNextSequence(seqDataSource, 'seq_table_value');
application.output(nextValue);

nextValue = databaseManager.getNextSequence(databaseManager.getDataSourceServerName(seqDataSource), databaseManager.getDataSourceTableName(seqDataSource), 'seq_table_value')
application.output(nextValue);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSQL-Object|class=node}{tr:id=name}{td}h6.getSQL{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQL{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getSQL-Object_des|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_des|trigger=none|class=sIndent}Returns the internal SQL which defines the specified (related)foundset.
Table filters are on by default.
Make sure to set the applicable filters when the sql is used in a loadRecords() call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSQL-Object_snc|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getSQL-Object_prs|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to get the sql for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getSQL-Object_ret|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_ret|trigger=none|class=sIndent}[String] -- String representing the sql of the JSFoundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSQL-Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSQL-Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSQL-Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_sam|trigger=none}{code:language=javascript}
var sql = databaseManager.getSQL(foundset)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSQL-Object_Boolean|class=node}{tr:id=name}{td}h6.getSQL{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQL{span}{span:id=iets|style=float: left;}\(foundset, includeFilters){span}{td}{tr}{tr:id=des}{td}{sub-section:getSQL-Object_Boolean_des|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_Boolean_des|trigger=none|class=sIndent}Returns the internal SQL which defines the specified (related)foundset.
Optionally, the foundset and table filter params can be excluded in the sql (includeFilters=false).
Make sure to set the applicable filters when the sql is used in a loadRecords() call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSQL-Object_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getSQL-Object_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_Boolean_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to get the sql for.
\{[Boolean]} includeFilters -- include the foundset and table filters.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getSQL-Object_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:getSQL-Object_Boolean_ret|trigger=none|class=sIndent}[String] -- String representing the sql of the JSFoundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSQL-Object_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSQL-Object_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSQL-Object_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQL-Object_Boolean_sam|trigger=none}{code:language=javascript}
var sql = databaseManager.getSQL(foundset)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSQLParameters-Object|class=node}{tr:id=name}{td}h6.getSQLParameters{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQLParameters{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getSQLParameters-Object_des|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_des|trigger=none|class=sIndent}Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.
Parameters for the filters are included.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSQLParameters-Object_snc|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getSQLParameters-Object_prs|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to get the sql parameters for.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getSQLParameters-Object_ret|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_ret|trigger=none|class=sIndent}[Object]\[] -- An Array with the sql parameter values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSQLParameters-Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSQLParameters-Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSQLParameters-Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_sam|trigger=none}{code:language=javascript}
var sqlParameterArray = databaseManager.getSQLParameters(foundset,false)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSQLParameters-Object_Boolean|class=node}{tr:id=name}{td}h6.getSQLParameters{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQLParameters{span}{span:id=iets|style=float: left;}\(foundset, includeFilters){span}{td}{tr}{tr:id=des}{td}{sub-section:getSQLParameters-Object_Boolean_des|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_Boolean_des|trigger=none|class=sIndent}Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSQLParameters-Object_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getSQLParameters-Object_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_Boolean_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to get the sql parameters for.
\{[Boolean]} includeFilters -- include the parameters for the filters.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getSQLParameters-Object_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:getSQLParameters-Object_Boolean_ret|trigger=none|class=sIndent}[Object]\[] -- An Array with the sql parameter values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSQLParameters-Object_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSQLParameters-Object_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSQLParameters-Object_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getSQLParameters-Object_Boolean_sam|trigger=none}{code:language=javascript}
var sqlParameterArray = databaseManager.getSQLParameters(foundset,false)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getServerNames|class=node}{tr:id=name}{td}h6.getServerNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getServerNames{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getServerNames_des|text=|trigger=button}{sub-section}{sub-section:getServerNames_des|trigger=none|class=sIndent}Returns an array with all the server names used in the solution.

NOTE: For more detail on named server connections, see the chapter on Database Connections, beginning with the Introduction to database connections in the Servoy Developer User's Guide.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getServerNames_snc|text=|trigger=button}{sub-section}{sub-section:getServerNames_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:getServerNames_prs|text=|trigger=button}{sub-section}{sub-section:getServerNames_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getServerNames_ret|text=|trigger=button}{sub-section}{sub-section:getServerNames_ret|trigger=none|class=sIndent}[String]\[] -- An Array of servernames.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getServerNames_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getServerNames_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getServerNames_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getServerNames_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getServerNames_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getServerNames_sam|trigger=none}{code:language=javascript}
var array = databaseManager.getServerNames()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTable-JSFoundSet|class=node}{tr:id=name}{td}h6.getTable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSTable]{span}{span:id=iets|style=float: left; font-weight: bold;}getTable{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:getTable-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:getTable-JSFoundSet_des|trigger=none|class=sIndent}Returns the JSTable object from which more info can be obtained (like columns).
The parameter can be a JSFoundset,JSRecord,datasource string or server/tablename combination.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTable-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:getTable-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTable-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:getTable-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The foundset where the JSTable can be get from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTable-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:getTable-JSFoundSet_ret|trigger=none|class=sIndent}[JSTable] -- the JSTable get from the input.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTable-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTable-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTable-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSFoundSet_sam|trigger=none}{code:language=javascript}
var jstable = databaseManager.getTable(controller.getDataSource());
//var jstable = databaseManager.getTable(foundset);
//var jstable = databaseManager.getTable(record);
//var jstable = databaseManager.getTable(datasource);
var tableSQLName = jstable.getSQLName();
var columnNamesArray = jstable.getColumnNames();
var firstColumnName = columnNamesArray[0];
var jscolumn = jstable.getColumn(firstColumnName);
var columnLength = jscolumn.getLength();
var columnType = jscolumn.getTypeAsString();
var columnSQLName = jscolumn.getSQLName();
var isPrimaryKey = jscolumn.isRowIdentifier();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTable-JSRecord|class=node}{tr:id=name}{td}h6.getTable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSTable]{span}{span:id=iets|style=float: left; font-weight: bold;}getTable{span}{span:id=iets|style=float: left;}\(record){span}{td}{tr}{tr:id=des}{td}{sub-section:getTable-JSRecord_des|text=|trigger=button}{sub-section}{sub-section:getTable-JSRecord_des|trigger=none|class=sIndent}Returns the JSTable object from which more info can be obtained (like columns).
The parameter can be a JSFoundset,JSRecord,datasource string or server/tablename combination.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTable-JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:getTable-JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTable-JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:getTable-JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- The record where the table can be get from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTable-JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:getTable-JSRecord_ret|trigger=none|class=sIndent}[JSTable] -- the JSTable get from the input.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTable-JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTable-JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTable-JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-JSRecord_sam|trigger=none}{code:language=javascript}
var jstable = databaseManager.getTable(controller.getDataSource());
//var jstable = databaseManager.getTable(foundset);
//var jstable = databaseManager.getTable(record);
//var jstable = databaseManager.getTable(datasource);
var tableSQLName = jstable.getSQLName();
var columnNamesArray = jstable.getColumnNames();
var firstColumnName = columnNamesArray[0];
var jscolumn = jstable.getColumn(firstColumnName);
var columnLength = jscolumn.getLength();
var columnType = jscolumn.getTypeAsString();
var columnSQLName = jscolumn.getSQLName();
var isPrimaryKey = jscolumn.isRowIdentifier();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTable-String|class=node}{tr:id=name}{td}h6.getTable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSTable]{span}{span:id=iets|style=float: left; font-weight: bold;}getTable{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:getTable-String_des|text=|trigger=button}{sub-section}{sub-section:getTable-String_des|trigger=none|class=sIndent}Returns the JSTable object from which more info can be obtained (like columns).
The parameter can be a JSFoundset,JSRecord,datasource string or server/tablename combination.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTable-String_snc|text=|trigger=button}{sub-section}{sub-section:getTable-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTable-String_prs|text=|trigger=button}{sub-section}{sub-section:getTable-String_prs|trigger=none|class=sIndent}\{[String]} dataSource -- The datasource where the table can be get from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTable-String_ret|text=|trigger=button}{sub-section}{sub-section:getTable-String_ret|trigger=none|class=sIndent}[JSTable] -- the JSTable get from the input.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTable-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTable-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTable-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_sam|trigger=none}{code:language=javascript}
var jstable = databaseManager.getTable(controller.getDataSource());
//var jstable = databaseManager.getTable(foundset);
//var jstable = databaseManager.getTable(record);
//var jstable = databaseManager.getTable(datasource);
var tableSQLName = jstable.getSQLName();
var columnNamesArray = jstable.getColumnNames();
var firstColumnName = columnNamesArray[0];
var jscolumn = jstable.getColumn(firstColumnName);
var columnLength = jscolumn.getLength();
var columnType = jscolumn.getTypeAsString();
var columnSQLName = jscolumn.getSQLName();
var isPrimaryKey = jscolumn.isRowIdentifier();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTable-String_String|class=node}{tr:id=name}{td}h6.getTable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSTable]{span}{span:id=iets|style=float: left; font-weight: bold;}getTable{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:getTable-String_String_des|text=|trigger=button}{sub-section}{sub-section:getTable-String_String_des|trigger=none|class=sIndent}Returns the JSTable object from which more info can be obtained (like columns).
The parameter can be a JSFoundset,JSRecord,datasource string or server/tablename combination.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTable-String_String_snc|text=|trigger=button}{sub-section}{sub-section:getTable-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTable-String_String_prs|text=|trigger=button}{sub-section}{sub-section:getTable-String_String_prs|trigger=none|class=sIndent}\{[String]} serverName -- Server name.
\{[String]} tableName -- Table name.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTable-String_String_ret|text=|trigger=button}{sub-section}{sub-section:getTable-String_String_ret|trigger=none|class=sIndent}[JSTable] -- the JSTable get from the input.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTable-String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTable-String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTable-String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTable-String_String_sam|trigger=none}{code:language=javascript}
var jstable = databaseManager.getTable(controller.getDataSource());
//var jstable = databaseManager.getTable(foundset);
//var jstable = databaseManager.getTable(record);
//var jstable = databaseManager.getTable(datasource);
var tableSQLName = jstable.getSQLName();
var columnNamesArray = jstable.getColumnNames();
var firstColumnName = columnNamesArray[0];
var jscolumn = jstable.getColumn(firstColumnName);
var columnLength = jscolumn.getLength();
var columnType = jscolumn.getTypeAsString();
var columnSQLName = jscolumn.getSQLName();
var isPrimaryKey = jscolumn.isRowIdentifier();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTableCount|class=node}{tr:id=name}{td}h6.getTableCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getTableCount{span}{span:id=iets|style=float: left;}\(dataSource){span}{td}{tr}{tr:id=des}{td}{sub-section:getTableCount_des|text=|trigger=button}{sub-section}{sub-section:getTableCount_des|trigger=none|class=sIndent}Returns the total number of records(rows) in a table.

NOTE: This can be an expensive operation (time\-wise) if your resultset is large{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTableCount_snc|text=|trigger=button}{sub-section}{sub-section:getTableCount_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTableCount_prs|text=|trigger=button}{sub-section}{sub-section:getTableCount_prs|trigger=none|class=sIndent}\{[Object]} dataSource -- Data where a server table can be get from. Can be a foundset, a datasource name or a JSTable.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTableCount_ret|text=|trigger=button}{sub-section}{sub-section:getTableCount_ret|trigger=none|class=sIndent}[Number] -- the total table count.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTableCount_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTableCount_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTableCount_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableCount_sam|trigger=none}{code:language=javascript}
//return the total number of rows in a table.
var count = databaseManager.getTableCount(foundset);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTableFilterParams-String|class=node}{tr:id=name}{td}h6.getTableFilterParams{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTableFilterParams{span}{span:id=iets|style=float: left;}\(serverName){span}{td}{tr}{tr:id=des}{td}{sub-section:getTableFilterParams-String_des|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_des|trigger=none|class=sIndent}Returns a two dimensional array object containing the table filter information currently applied to the servers tables.
The "columns" of a row from this array are: tablename,dataprovider,operator,value,tablefilername{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTableFilterParams-String_snc|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTableFilterParams-String_prs|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_prs|trigger=none|class=sIndent}\{[String]} serverName -- The name of the database server connection.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTableFilterParams-String_ret|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_ret|trigger=none|class=sIndent}[Object]\[]\[] -- Two dimensional array.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTableFilterParams-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTableFilterParams-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTableFilterParams-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_sam|trigger=none}{code:language=javascript}
var params = databaseManager.getTableFilterParams(databaseManager.getDataSourceServerName(controller.getDataSource()))
for (var i = 0; params != null && i < params.length; i++)
{
	application.output('Table 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=getTableFilterParams-String_String|class=node}{tr:id=name}{td}h6.getTableFilterParams{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTableFilterParams{span}{span:id=iets|style=float: left;}\(serverName, filterName){span}{td}{tr}{tr:id=des}{td}{sub-section:getTableFilterParams-String_String_des|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_String_des|trigger=none|class=sIndent}Returns a two dimensional array object containing the table filter information currently applied to the servers tables.
The "columns" of a row from this array are: tablename,dataprovider,operator,value,tablefilername{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTableFilterParams-String_String_snc|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTableFilterParams-String_String_prs|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_String_prs|trigger=none|class=sIndent}\{[String]} serverName -- The name of the database server connection.
\{[String]} filterName -- The filter name for which to get the array.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTableFilterParams-String_String_ret|text=|trigger=button}{sub-section}{sub-section:getTableFilterParams-String_String_ret|trigger=none|class=sIndent}[Object]\[]\[] -- Two dimensional array.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTableFilterParams-String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTableFilterParams-String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTableFilterParams-String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableFilterParams-String_String_sam|trigger=none}{code:language=javascript}
var params = databaseManager.getTableFilterParams(databaseManager.getDataSourceServerName(controller.getDataSource()))
for (var i = 0; params != null && i < params.length; i++)
{
	application.output('Table 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=getTableNames|class=node}{tr:id=name}{td}h6.getTableNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getTableNames{span}{span:id=iets|style=float: left;}\(serverName){span}{td}{tr}{tr:id=des}{td}{sub-section:getTableNames_des|text=|trigger=button}{sub-section}{sub-section:getTableNames_des|trigger=none|class=sIndent}Returns an array of all table names for a specified server.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTableNames_snc|text=|trigger=button}{sub-section}{sub-section:getTableNames_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getTableNames_prs|text=|trigger=button}{sub-section}{sub-section:getTableNames_prs|trigger=none|class=sIndent}\{[String]} serverName -- The server name to get the table names from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getTableNames_ret|text=|trigger=button}{sub-section}{sub-section:getTableNames_ret|trigger=none|class=sIndent}[String]\[] -- An Array with the tables names of that server.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTableNames_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableNames_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTableNames_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableNames_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTableNames_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getTableNames_sam|trigger=none}{code:language=javascript}
//return all the table names as array
var tableNamesArray = databaseManager.getTableNames('user_data');
var firstTableName = tableNamesArray[0];
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getViewNames|class=node}{tr:id=name}{td}h6.getViewNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getViewNames{span}{span:id=iets|style=float: left;}\(serverName){span}{td}{tr}{tr:id=des}{td}{sub-section:getViewNames_des|text=|trigger=button}{sub-section}{sub-section:getViewNames_des|trigger=none|class=sIndent}Returns an array of all view names for a specified server.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getViewNames_snc|text=|trigger=button}{sub-section}{sub-section:getViewNames_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getViewNames_prs|text=|trigger=button}{sub-section}{sub-section:getViewNames_prs|trigger=none|class=sIndent}\{[String]} serverName -- The server name to get the view names from.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getViewNames_ret|text=|trigger=button}{sub-section}{sub-section:getViewNames_ret|trigger=none|class=sIndent}[String]\[] -- An Array with the view names of that server.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getViewNames_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getViewNames_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getViewNames_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getViewNames_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getViewNames_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getViewNames_sam|trigger=none}{code:language=javascript}
//return all the view names as array
var viewNamesArray = databaseManager.getViewNames('user_data');
var firstViewName = viewNamesArray[0];
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasLocks|class=node}{tr:id=name}{td}h6.hasLocks{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasLocks{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:hasLocks_des|text=|trigger=button}{sub-section}{sub-section:hasLocks_des|trigger=none|class=sIndent}Returns true if the current client has any or the specified lock(s) acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasLocks_snc|text=|trigger=button}{sub-section}{sub-section:hasLocks_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:hasLocks_prs|text=|trigger=button}{sub-section}{sub-section:hasLocks_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:hasLocks_ret|text=|trigger=button}{sub-section}{sub-section:hasLocks_ret|trigger=none|class=sIndent}[Boolean] -- true if the current client has locks or the lock.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasLocks_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasLocks_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasLocks_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks_sam|trigger=none}{code:language=javascript}
var hasLocks = databaseManager.hasLocks('mylock')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasLocks-String|class=node}{tr:id=name}{td}h6.hasLocks{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasLocks{span}{span:id=iets|style=float: left;}\(lockName){span}{td}{tr}{tr:id=des}{td}{sub-section:hasLocks-String_des|text=|trigger=button}{sub-section}{sub-section:hasLocks-String_des|trigger=none|class=sIndent}Returns true if the current client has any or the specified lock(s) acquired.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasLocks-String_snc|text=|trigger=button}{sub-section}{sub-section:hasLocks-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasLocks-String_prs|text=|trigger=button}{sub-section}{sub-section:hasLocks-String_prs|trigger=none|class=sIndent}\{[String]} lockName -- The lock name to check.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasLocks-String_ret|text=|trigger=button}{sub-section}{sub-section:hasLocks-String_ret|trigger=none|class=sIndent}[Boolean] -- true if the current client has locks or the lock.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasLocks-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasLocks-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasLocks-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasLocks-String_sam|trigger=none}{code:language=javascript}
var hasLocks = databaseManager.hasLocks('mylock')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasNewRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.hasNewRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasNewRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:hasNewRecords-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_des|trigger=none|class=sIndent}Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasNewRecords-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasNewRecords-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to test.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasNewRecords-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_ret|trigger=none|class=sIndent}[Boolean] -- true if the JSFoundset has new records or JSRecord is a new record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasNewRecords-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasNewRecords-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasNewRecords-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
var fs = databaseManager.getFoundSet(databaseManager.getDataSourceServerName(controller.getDataSource()),'employees');
databaseManager.startTransaction();
var ridx = fs.newRecord();
var record = fs.getRecord(ridx);
record.emp_name = 'John';
if (databaseManager.hasNewRecords(fs)) {
	application.output("new records");
} else {
	application.output("no new records");
}
databaseManager.saveData();
databaseManager.commitTransaction();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasNewRecords-JSFoundSet_Number|class=node}{tr:id=name}{td}h6.hasNewRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasNewRecords{span}{span:id=iets|style=float: left;}\(foundset, index){span}{td}{tr}{tr:id=des}{td}{sub-section:hasNewRecords-JSFoundSet_Number_des|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_Number_des|trigger=none|class=sIndent}Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasNewRecords-JSFoundSet_Number_snc|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasNewRecords-JSFoundSet_Number_prs|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_Number_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to test.
\{[Number]} index -- The record index in the foundset to test (not specified means has the foundset any new records)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasNewRecords-JSFoundSet_Number_ret|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSFoundSet_Number_ret|trigger=none|class=sIndent}[Boolean] -- true if the JSFoundset has new records or JSRecord is a new record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasNewRecords-JSFoundSet_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasNewRecords-JSFoundSet_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasNewRecords-JSFoundSet_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSFoundSet_Number_sam|trigger=none}{code:language=javascript}
var fs = databaseManager.getFoundSet(databaseManager.getDataSourceServerName(controller.getDataSource()),'employees');
databaseManager.startTransaction();
var ridx = fs.newRecord();
var record = fs.getRecord(ridx);
record.emp_name = 'John';
if (databaseManager.hasNewRecords(fs)) {
	application.output("new records");
} else {
	application.output("no new records");
}
databaseManager.saveData();
databaseManager.commitTransaction();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasNewRecords-JSRecord|class=node}{tr:id=name}{td}h6.hasNewRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasNewRecords{span}{span:id=iets|style=float: left;}\(record){span}{td}{tr}{tr:id=des}{td}{sub-section:hasNewRecords-JSRecord_des|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSRecord_des|trigger=none|class=sIndent}Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasNewRecords-JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasNewRecords-JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- The JSRecord to test.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasNewRecords-JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:hasNewRecords-JSRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if the JSFoundset has new records or JSRecord is a new record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasNewRecords-JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasNewRecords-JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasNewRecords-JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasNewRecords-JSRecord_sam|trigger=none}{code:language=javascript}
var fs = databaseManager.getFoundSet(databaseManager.getDataSourceServerName(controller.getDataSource()),'employees');
databaseManager.startTransaction();
var ridx = fs.newRecord();
var record = fs.getRecord(ridx);
record.emp_name = 'John';
if (databaseManager.hasNewRecords(fs)) {
	application.output("new records");
} else {
	application.output("no new records");
}
databaseManager.saveData();
databaseManager.commitTransaction();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecordChanges-JSFoundSet|class=node}{tr:id=name}{td}h6.hasRecordChanges{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecordChanges{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:hasRecordChanges-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_des|trigger=none|class=sIndent}Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasRecordChanges-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecordChanges-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to test if it has changes.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecordChanges-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_ret|trigger=none|class=sIndent}[Boolean] -- true if there are changes in the JSFoundset or JSRecord.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecordChanges-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecordChanges-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecordChanges-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_sam|trigger=none}{code:language=javascript}
if (databaseManager.hasRecordChanges(foundset,2))
{
	//do save or something else
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecordChanges-JSFoundSet_Number|class=node}{tr:id=name}{td}h6.hasRecordChanges{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecordChanges{span}{span:id=iets|style=float: left;}\(foundset, index){span}{td}{tr}{tr:id=des}{td}{sub-section:hasRecordChanges-JSFoundSet_Number_des|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_Number_des|trigger=none|class=sIndent}Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasRecordChanges-JSFoundSet_Number_snc|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecordChanges-JSFoundSet_Number_prs|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_Number_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to test if it has changes.
\{[Number]} index -- The record index in the foundset to test (not specified means has the foundset any changed records)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecordChanges-JSFoundSet_Number_ret|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSFoundSet_Number_ret|trigger=none|class=sIndent}[Boolean] -- true if there are changes in the JSFoundset or JSRecord.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecordChanges-JSFoundSet_Number_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecordChanges-JSFoundSet_Number_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecordChanges-JSFoundSet_Number_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSFoundSet_Number_sam|trigger=none}{code:language=javascript}
if (databaseManager.hasRecordChanges(foundset,2))
{
	//do save or something else
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecordChanges-JSRecord|class=node}{tr:id=name}{td}h6.hasRecordChanges{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecordChanges{span}{span:id=iets|style=float: left;}\(record){span}{td}{tr}{tr:id=des}{td}{sub-section:hasRecordChanges-JSRecord_des|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSRecord_des|trigger=none|class=sIndent}Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasRecordChanges-JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecordChanges-JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- The JSRecord to test if it has changes.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecordChanges-JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:hasRecordChanges-JSRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if there are changes in the JSFoundset or JSRecord.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecordChanges-JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecordChanges-JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecordChanges-JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecordChanges-JSRecord_sam|trigger=none}{code:language=javascript}
if (databaseManager.hasRecordChanges(foundset,2))
{
	//do save or something else
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.hasRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:hasRecords-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSFoundSet_des|trigger=none|class=sIndent}Returns true if the (related)foundset exists and has records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasRecords-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecords-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- A JSFoundset to test.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecords-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSFoundSet_ret|trigger=none|class=sIndent}[Boolean] -- true if the foundset/relation has records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecords-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecords-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecords-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
	//do work on relatedFoundSet
}
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
//	//do work on deeper relatedFoundSet
//}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasRecords-JSRecord_String|class=node}{tr:id=name}{td}h6.hasRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasRecords{span}{span:id=iets|style=float: left;}\(record, relationString){span}{td}{tr}{tr:id=des}{td}{sub-section:hasRecords-JSRecord_String_des|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSRecord_String_des|trigger=none|class=sIndent}Returns true if the (related)foundset exists and has records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasRecords-JSRecord_String_snc|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSRecord_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasRecords-JSRecord_String_prs|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSRecord_String_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- A JSRecord to test.
\{[String]} relationString -- The relation name.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasRecords-JSRecord_String_ret|text=|trigger=button}{sub-section}{sub-section:hasRecords-JSRecord_String_ret|trigger=none|class=sIndent}[Boolean] -- true if the foundset/relation has records.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasRecords-JSRecord_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasRecords-JSRecord_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasRecords-JSRecord_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasRecords-JSRecord_String_sam|trigger=none}{code:language=javascript}
if (elements.customer_id.hasRecords(orders_to_orderitems))
{
	//do work on relatedFoundSet
}
//if (elements.customer_id.hasRecords(foundset.getSelectedRecord(),'orders_to_orderitems.orderitems_to_products'))
//{
//	//do work on deeper relatedFoundSet
//}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasTransaction|class=node}{tr:id=name}{td}h6.hasTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasTransaction{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:hasTransaction_des|text=|trigger=button}{sub-section}{sub-section:hasTransaction_des|trigger=none|class=sIndent}Returns true if there is an transaction active for this client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasTransaction_snc|text=|trigger=button}{sub-section}{sub-section:hasTransaction_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:hasTransaction_prs|text=|trigger=button}{sub-section}{sub-section:hasTransaction_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:hasTransaction_ret|text=|trigger=button}{sub-section}{sub-section:hasTransaction_ret|trigger=none|class=sIndent}[Boolean] -- true if the client has a transaction.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasTransaction_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasTransaction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasTransaction_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasTransaction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasTransaction_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:hasTransaction_sam|trigger=none}{code:language=javascript}
var hasTransaction = databaseManager.hasTransaction()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=mergeRecords-JSRecord_JSRecord|class=node}{tr:id=name}{td}h6.mergeRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}mergeRecords{span}{span:id=iets|style=float: left;}\(sourceRecord, combinedDestinationRecord){span}{td}{tr}{tr:id=des}{td}{sub-section:mergeRecords-JSRecord_JSRecord_des|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_des|trigger=none|class=sIndent}Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination 
record pk, deletes source record. Do use a transaction!

This function is very handy in situations where duplicate data exists. It allows you to merge the two records 
and move all related records in one go. Say the source\_record is "Ikea" and the combined\_destination\_record is "IKEA", the 
"Ikea" record is deleted and all records related to it (think of contacts and orders, for instance) will be related 
to the "IKEA" record. 

The function takes an optional array of column names. If provided, the data in the named columns will be copied 
from source\_record to combined\_destination\_record. 

Note that it is essential for both records to originate from the same foundset, as shown in the sample code.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:mergeRecords-JSRecord_JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:mergeRecords-JSRecord_JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} sourceRecord -- The source JSRecord to copy from.
\{[JSRecord]} combinedDestinationRecord -- The target/destination JSRecord to copy into.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:mergeRecords-JSRecord_JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if the records could me merged.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:mergeRecords-JSRecord_JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:mergeRecords-JSRecord_JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:mergeRecords-JSRecord_JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_sam|trigger=none}{code:language=javascript}
databaseManager.mergeRecords(foundset.getRecord(1),foundset.getRecord(2));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=mergeRecords-JSRecord_JSRecord_StringArray|class=node}{tr:id=name}{td}h6.mergeRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}mergeRecords{span}{span:id=iets|style=float: left;}\(sourceRecord, combinedDestinationRecord, columnNames){span}{td}{tr}{tr:id=des}{td}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_des|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_des|trigger=none|class=sIndent}Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination 
record pk, deletes source record. Do use a transaction!

This function is very handy in situations where duplicate data exists. It allows you to merge the two records 
and move all related records in one go. Say the source\_record is "Ikea" and the combined\_destination\_record is "IKEA", the 
"Ikea" record is deleted and all records related to it (think of contacts and orders, for instance) will be related 
to the "IKEA" record. 

The function takes an optional array of column names. If provided, the data in the named columns will be copied 
from source\_record to combined\_destination\_record. 

Note that it is essential for both records to originate from the same foundset, as shown in the sample code.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_snc|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_prs|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_prs|trigger=none|class=sIndent}\{[JSRecord]} sourceRecord -- The source JSRecord to copy from.
\{[JSRecord]} combinedDestinationRecord -- The target/destination JSRecord to copy into.
\{[String]\[]} columnNames -- The column names array that should be copied.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_ret|text=|trigger=button}{sub-section}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_ret|trigger=none|class=sIndent}[Boolean] -- true if the records could me merged.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:mergeRecords-JSRecord_JSRecord_StringArray_sam|trigger=none}{code:language=javascript}
databaseManager.mergeRecords(foundset.getRecord(1),foundset.getRecord(2));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=recalculate|class=node}{tr:id=name}{td}h6.recalculate{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}recalculate{span}{span:id=iets|style=float: left;}\(foundsetOrRecord){span}{td}{tr}{tr:id=des}{td}{sub-section:recalculate_des|text=|trigger=button}{sub-section}{sub-section:recalculate_des|trigger=none|class=sIndent}Can be used to recalculate a specified record or all rows in the specified foundset.
May be necessary when data is changed from outside of servoy, or when there is data changed inside servoy 
but records with calculations depending on that data where not loaded so not updated and you need to update
the stored calculation values because you are depending on that with queries or aggregates.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:recalculate_snc|text=|trigger=button}{sub-section}{sub-section:recalculate_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:recalculate_prs|text=|trigger=button}{sub-section}{sub-section:recalculate_prs|trigger=none|class=sIndent}\{[Object]} foundsetOrRecord -- JSFoundset or JSRecord to recalculate.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:recalculate_ret|text=|trigger=button}{sub-section}{sub-section:recalculate_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:recalculate_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recalculate_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:recalculate_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recalculate_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:recalculate_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:recalculate_sam|trigger=none}{code:language=javascript}
// recalculate one record from a foundset.
databaseManager.recalculate(foundset.getRecord(1));
// recalculate all records from the foundset.
// please use with care, this can be expensive!
//databaseManager.recalculate(foundset);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=refreshRecordFromDatabase|class=node}{tr:id=name}{td}h6.refreshRecordFromDatabase{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}refreshRecordFromDatabase{span}{span:id=iets|style=float: left;}\(foundset, index){span}{td}{tr}{tr:id=des}{td}{sub-section:refreshRecordFromDatabase_des|text=|trigger=button}{sub-section}{sub-section:refreshRecordFromDatabase_des|trigger=none|class=sIndent}Flushes the client data cache and requeries the data for a record (based on the record index) in a foundset or all records in the foundset.
Used where a program external to Servoy has modified the database record.
Record index of \-1 will refresh all records in the foundset and 0 the selected record.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:refreshRecordFromDatabase_snc|text=|trigger=button}{sub-section}{sub-section:refreshRecordFromDatabase_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:refreshRecordFromDatabase_prs|text=|trigger=button}{sub-section}{sub-section:refreshRecordFromDatabase_prs|trigger=none|class=sIndent}\{[Object]} foundset -- The JSFoundset to refresh
\{[Number]} index -- The index of the JSRecord that must be refreshed (or \-1 for all).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:refreshRecordFromDatabase_ret|text=|trigger=button}{sub-section}{sub-section:refreshRecordFromDatabase_ret|trigger=none|class=sIndent}[Boolean] -- true if the refresh was done.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:refreshRecordFromDatabase_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:refreshRecordFromDatabase_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:refreshRecordFromDatabase_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:refreshRecordFromDatabase_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:refreshRecordFromDatabase_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:refreshRecordFromDatabase_sam|trigger=none}{code:language=javascript}
//refresh the second record from the foundset.
databaseManager.refreshRecordFromDatabase(foundset,2)
//flushes all records in the related foundset  (-1 is or can be an expensive operation)
databaseManager.refreshRecordFromDatabase(order_to_orderdetails,-1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=releaseAllLocks|class=node}{tr:id=name}{td}h6.releaseAllLocks{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}releaseAllLocks{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:releaseAllLocks_des|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks_des|trigger=none|class=sIndent}Release all current locks the client has (optionally limited to named locks).
return true if the locks are released.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:releaseAllLocks_snc|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks_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:releaseAllLocks_prs|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:releaseAllLocks_ret|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks_ret|trigger=none|class=sIndent}[Boolean] -- true if all locks or the lock is released.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:releaseAllLocks_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:releaseAllLocks_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:releaseAllLocks_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks_sam|trigger=none}{code:language=javascript}
databaseManager.releaseAllLocks('mylock')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=releaseAllLocks-String|class=node}{tr:id=name}{td}h6.releaseAllLocks{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}releaseAllLocks{span}{span:id=iets|style=float: left;}\(lockName){span}{td}{tr}{tr:id=des}{td}{sub-section:releaseAllLocks-String_des|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks-String_des|trigger=none|class=sIndent}Release all current locks the client has (optionally limited to named locks).
return true if the locks are released.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:releaseAllLocks-String_snc|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:releaseAllLocks-String_prs|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks-String_prs|trigger=none|class=sIndent}\{[String]} lockName -- The lock name to release.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:releaseAllLocks-String_ret|text=|trigger=button}{sub-section}{sub-section:releaseAllLocks-String_ret|trigger=none|class=sIndent}[Boolean] -- true if all locks or the lock is released.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:releaseAllLocks-String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:releaseAllLocks-String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:releaseAllLocks-String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:releaseAllLocks-String_sam|trigger=none}{code:language=javascript}
databaseManager.releaseAllLocks('mylock')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeTableFilterParam|class=node}{tr:id=name}{td}h6.removeTableFilterParam{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeTableFilterParam{span}{span:id=iets|style=float: left;}\(serverName, filterName){span}{td}{tr}{tr:id=des}{td}{sub-section:removeTableFilterParam_des|text=|trigger=button}{sub-section}{sub-section:removeTableFilterParam_des|trigger=none|class=sIndent}Removes a previously defined table filter.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeTableFilterParam_snc|text=|trigger=button}{sub-section}{sub-section:removeTableFilterParam_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeTableFilterParam_prs|text=|trigger=button}{sub-section}{sub-section:removeTableFilterParam_prs|trigger=none|class=sIndent}\{[String]} serverName -- The name of the database server connection.
\{[String]} filterName -- The name of the filter that should be removed.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeTableFilterParam_ret|text=|trigger=button}{sub-section}{sub-section:removeTableFilterParam_ret|trigger=none|class=sIndent}[Boolean] -- true if the filter could be removed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeTableFilterParam_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeTableFilterParam_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeTableFilterParam_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeTableFilterParam_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeTableFilterParam_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeTableFilterParam_sam|trigger=none}{code:language=javascript}
var success = databaseManager.removeTableFilterParam('admin', 'higNumberedMessagesRule')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertEditedRecords|class=node}{tr:id=name}{td}h6.revertEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}revertEditedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:revertEditedRecords_des|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords_des|trigger=none|class=sIndent}Reverts outstanding (not saved) in memory changes from edited records. 
Can specify a record or foundset as parameter to rollback.
Best used in combination with the function databaseManager.setAutoSave()
This does not include deletes, they do not honor the autosafe false flag so they cant be rollbacked by this call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:revertEditedRecords_snc|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords_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:revertEditedRecords_prs|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:revertEditedRecords_ret|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:revertEditedRecords_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:revertEditedRecords_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:revertEditedRecords_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords_sam|trigger=none}{code:language=javascript}
//Set autosave, if false then no saves will happen by the ui (not including deletes!). Until you call saveData or setAutoSave(true)
//reverts in mem the records that were edited and not yet saved. Best used in combination with autosave false.
databaseManager.setAutoSave(false)
//Now let users input data

//On save or cancel, when data has been entered:
if (cancel) databaseManager.revertEditedRecords()
//databaseManager.revertEditedRecords(foundset); // rollback all records from foundset
//databaseManager.revertEditedRecords(foundset.getSelectedRecord()); // rollback only one record
databaseManager.setAutoSave(true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertEditedRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.revertEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}revertEditedRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:revertEditedRecords-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSFoundSet_des|trigger=none|class=sIndent}Reverts outstanding (not saved) in memory changes from edited records. 
Can specify a record or foundset as parameter to rollback.
Best used in combination with the function databaseManager.setAutoSave()
This does not include deletes, they do not honor the autosafe false flag so they cant be rollbacked by this call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:revertEditedRecords-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:revertEditedRecords-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- A JSFoundset to revert.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:revertEditedRecords-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSFoundSet_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:revertEditedRecords-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:revertEditedRecords-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:revertEditedRecords-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
//Set autosave, if false then no saves will happen by the ui (not including deletes!). Until you call saveData or setAutoSave(true)
//reverts in mem the records that were edited and not yet saved. Best used in combination with autosave false.
databaseManager.setAutoSave(false)
//Now let users input data

//On save or cancel, when data has been entered:
if (cancel) databaseManager.revertEditedRecords()
//databaseManager.revertEditedRecords(foundset); // rollback all records from foundset
//databaseManager.revertEditedRecords(foundset.getSelectedRecord()); // rollback only one record
databaseManager.setAutoSave(true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertEditedRecords-JSRecord|class=node}{tr:id=name}{td}h6.revertEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}revertEditedRecords{span}{span:id=iets|style=float: left;}\(record){span}{td}{tr}{tr:id=des}{td}{sub-section:revertEditedRecords-JSRecord_des|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSRecord_des|trigger=none|class=sIndent}Reverts outstanding (not saved) in memory changes from edited records. 
Can specify a record or foundset as parameter to rollback.
Best used in combination with the function databaseManager.setAutoSave()
This does not include deletes, they do not honor the autosafe false flag so they cant be rollbacked by this call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:revertEditedRecords-JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:revertEditedRecords-JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- A JSRecord to rollback.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:revertEditedRecords-JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:revertEditedRecords-JSRecord_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:revertEditedRecords-JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:revertEditedRecords-JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:revertEditedRecords-JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:revertEditedRecords-JSRecord_sam|trigger=none}{code:language=javascript}
//Set autosave, if false then no saves will happen by the ui (not including deletes!). Until you call saveData or setAutoSave(true)
//reverts in mem the records that were edited and not yet saved. Best used in combination with autosave false.
databaseManager.setAutoSave(false)
//Now let users input data

//On save or cancel, when data has been entered:
if (cancel) databaseManager.revertEditedRecords()
//databaseManager.revertEditedRecords(foundset); // rollback all records from foundset
//databaseManager.revertEditedRecords(foundset.getSelectedRecord()); // rollback only one record
databaseManager.setAutoSave(true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rollbackTransaction|class=node}{tr:id=name}{td}h6.rollbackTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}rollbackTransaction{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:rollbackTransaction_des|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction_des|trigger=none|class=sIndent}Rollback a transaction started by databaseManager.startTransaction().
Note that when autosave is false, rollbackEditedRecords() will not handle deleted records, while rollbackTransaction() does.
Also, rollbackEditedRecords() is called before rolling back the transaction see rollbackTransaction(boolean) to controll that behavior
and saved records within the transactions are restored to the database values, so user input is lost, to controll this see rollbackTransaction(boolean,boolean){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rollbackTransaction_snc|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction_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:rollbackTransaction_prs|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:rollbackTransaction_ret|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rollbackTransaction_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rollbackTransaction_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rollbackTransaction_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rollbackTransaction-Boolean|class=node}{tr:id=name}{td}h6.rollbackTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}rollbackTransaction{span}{span:id=iets|style=float: left;}\(rollbackEdited){span}{td}{tr}{tr:id=des}{td}{sub-section:rollbackTransaction-Boolean_des|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_des|trigger=none|class=sIndent}Rollback a transaction started by databaseManager.startTransaction().
Note that when autosave is false, rollbackEditedRecords() will not handle deleted records, while rollbackTransaction() does.
Also, saved records within the transactions are restored to the database values, so user input is lost, to controll this see rollbackTransaction(boolean,boolean){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rollbackTransaction-Boolean_snc|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:rollbackTransaction-Boolean_prs|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} rollbackEdited -- call rollbackEditedRecords() before rolling back the transaction
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:rollbackTransaction-Boolean_ret|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rollbackTransaction-Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rollbackTransaction-Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rollbackTransaction-Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rollbackTransaction-Boolean_Boolean|class=node}{tr:id=name}{td}h6.rollbackTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}rollbackTransaction{span}{span:id=iets|style=float: left;}\(rollbackEdited, revertSavedRecords){span}{td}{tr}{tr:id=des}{td}{sub-section:rollbackTransaction-Boolean_Boolean_des|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_Boolean_des|trigger=none|class=sIndent}Rollback a transaction started by databaseManager.startTransaction().
Note that when autosave is false, rollbackEditedRecords() will not handle deleted records, while rollbackTransaction() does.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rollbackTransaction-Boolean_Boolean_snc|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:rollbackTransaction-Boolean_Boolean_prs|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} rollbackEdited -- call rollbackEditedRecords() before rolling back the transaction
\{[Boolean]} revertSavedRecords -- if false then all records in the transaction do keep the user input and are back in the edited records list
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:rollbackTransaction-Boolean_Boolean_ret|text=|trigger=button}{sub-section}{sub-section:rollbackTransaction-Boolean_Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rollbackTransaction-Boolean_Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rollbackTransaction-Boolean_Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rollbackTransaction-Boolean_Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:rollbackTransaction-Boolean_Boolean_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=saveData|class=node}{tr:id=name}{td}h6.saveData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}saveData{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:saveData_des|text=|trigger=button}{sub-section}{sub-section:saveData_des|trigger=none|class=sIndent}Saves all outstanding (unsaved) data and exits the current record. 
Optionally, by specifying a record or foundset, can save a single record or all reacords from foundset instead of all the data.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:saveData_snc|text=|trigger=button}{sub-section}{sub-section:saveData_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:saveData_prs|text=|trigger=button}{sub-section}{sub-section:saveData_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:saveData_ret|text=|trigger=button}{sub-section}{sub-section:saveData_ret|trigger=none|class=sIndent}[Boolean] -- true if the save was done without an error.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:saveData_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:saveData_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:saveData_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData_sam|trigger=none}{code:language=javascript}
databaseManager.saveData();
//databaseManager.saveData(foundset.getRecord(1));//save specific record
//databaseManager.saveData(foundset);//save all records from foundset

// when creating many records in a loop do a batch save on an interval as every 10 records (to save on memory and roundtrips)
// for (var recordIndex = 1; recordIndex <= 5000; recordIndex++) 
// {
//		currentcontroller.newRecord();
//		someColumn = recordIndex;
//		anotherColumn = "Index is: " + recordIndex;
//		if (recordIndex % 10 == 0) databaseManager.saveData();
// }
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=saveData-JSFoundSet|class=node}{tr:id=name}{td}h6.saveData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}saveData{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{tr:id=des}{td}{sub-section:saveData-JSFoundSet_des|text=|trigger=button}{sub-section}{sub-section:saveData-JSFoundSet_des|trigger=none|class=sIndent}Saves all outstanding (unsaved) data and exits the current record. 
Optionally, by specifying a record or foundset, can save a single record or all reacords from foundset instead of all the data.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:saveData-JSFoundSet_snc|text=|trigger=button}{sub-section}{sub-section:saveData-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:saveData-JSFoundSet_prs|text=|trigger=button}{sub-section}{sub-section:saveData-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- The JSFoundset to save.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:saveData-JSFoundSet_ret|text=|trigger=button}{sub-section}{sub-section:saveData-JSFoundSet_ret|trigger=none|class=sIndent}[Boolean] -- true if the save was done without an error.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:saveData-JSFoundSet_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:saveData-JSFoundSet_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSFoundSet_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:saveData-JSFoundSet_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSFoundSet_sam|trigger=none}{code:language=javascript}
databaseManager.saveData();
//databaseManager.saveData(foundset.getRecord(1));//save specific record
//databaseManager.saveData(foundset);//save all records from foundset

// when creating many records in a loop do a batch save on an interval as every 10 records (to save on memory and roundtrips)
// for (var recordIndex = 1; recordIndex <= 5000; recordIndex++) 
// {
//		currentcontroller.newRecord();
//		someColumn = recordIndex;
//		anotherColumn = "Index is: " + recordIndex;
//		if (recordIndex % 10 == 0) databaseManager.saveData();
// }
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=saveData-JSRecord|class=node}{tr:id=name}{td}h6.saveData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}saveData{span}{span:id=iets|style=float: left;}\(record){span}{td}{tr}{tr:id=des}{td}{sub-section:saveData-JSRecord_des|text=|trigger=button}{sub-section}{sub-section:saveData-JSRecord_des|trigger=none|class=sIndent}Saves all outstanding (unsaved) data and exits the current record. 
Optionally, by specifying a record or foundset, can save a single record or all reacords from foundset instead of all the data.

NOTE: The fields focus may be lost in user interface in order to determine the edits.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:saveData-JSRecord_snc|text=|trigger=button}{sub-section}{sub-section:saveData-JSRecord_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:saveData-JSRecord_prs|text=|trigger=button}{sub-section}{sub-section:saveData-JSRecord_prs|trigger=none|class=sIndent}\{[JSRecord]} record -- The JSRecord to save.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:saveData-JSRecord_ret|text=|trigger=button}{sub-section}{sub-section:saveData-JSRecord_ret|trigger=none|class=sIndent}[Boolean] -- true if the save was done without an error.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:saveData-JSRecord_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSRecord_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:saveData-JSRecord_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSRecord_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:saveData-JSRecord_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:saveData-JSRecord_sam|trigger=none}{code:language=javascript}
databaseManager.saveData();
//databaseManager.saveData(foundset.getRecord(1));//save specific record
//databaseManager.saveData(foundset);//save all records from foundset

// when creating many records in a loop do a batch save on an interval as every 10 records (to save on memory and roundtrips)
// for (var recordIndex = 1; recordIndex <= 5000; recordIndex++) 
// {
//		currentcontroller.newRecord();
//		someColumn = recordIndex;
//		anotherColumn = "Index is: " + recordIndex;
//		if (recordIndex % 10 == 0) databaseManager.saveData();
// }
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setAutoSave|class=node}{tr:id=name}{td}h6.setAutoSave{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setAutoSave{span}{span:id=iets|style=float: left;}\(autoSave){span}{td}{tr}{tr:id=des}{td}{sub-section:setAutoSave_des|text=|trigger=button}{sub-section}{sub-section:setAutoSave_des|trigger=none|class=sIndent}Set autosave, if false then no saves will happen by the ui (not including deletes!). 
Until you call databaseManager.saveData() or setAutoSave(true)

If you also want to be able to rollback deletes then you have to use databaseManager.startTransaction().
Because even if autosave is false deletes of records will be done.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setAutoSave_snc|text=|trigger=button}{sub-section}{sub-section:setAutoSave_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setAutoSave_prs|text=|trigger=button}{sub-section}{sub-section:setAutoSave_prs|trigger=none|class=sIndent}\{[Boolean]} autoSave -- Boolean to enable or disable autosave.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setAutoSave_ret|text=|trigger=button}{sub-section}{sub-section:setAutoSave_ret|trigger=none|class=sIndent}[Boolean] -- false if the current edited record could not be saved.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setAutoSave_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAutoSave_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setAutoSave_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAutoSave_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setAutoSave_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setAutoSave_sam|trigger=none}{code:language=javascript}
//Rollbacks in mem the records that were edited and not yet saved. Best used in combination with autosave false.
databaseManager.setAutoSave(false)
//Now let users input data

//On save or cancel, when data has been entered:
if (cancel) databaseManager.rollbackEditedRecords()
databaseManager.setAutoSave(true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setCreateEmptyFormFoundsets|class=node}{tr:id=name}{td}h6.setCreateEmptyFormFoundsets{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setCreateEmptyFormFoundsets{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:setCreateEmptyFormFoundsets_des|text=|trigger=button}{sub-section}{sub-section:setCreateEmptyFormFoundsets_des|trigger=none|class=sIndent}Turnoff the initial form foundset record loading, set this in the solution open method.
Simular to calling foundset.clear() in the form's onload event.

NOTE: When the foundset record loading is turned off, controller.find or controller.loadAllRecords must be called to display the records{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setCreateEmptyFormFoundsets_snc|text=|trigger=button}{sub-section}{sub-section:setCreateEmptyFormFoundsets_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:setCreateEmptyFormFoundsets_prs|text=|trigger=button}{sub-section}{sub-section:setCreateEmptyFormFoundsets_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setCreateEmptyFormFoundsets_ret|text=|trigger=button}{sub-section}{sub-section:setCreateEmptyFormFoundsets_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setCreateEmptyFormFoundsets_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCreateEmptyFormFoundsets_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setCreateEmptyFormFoundsets_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCreateEmptyFormFoundsets_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setCreateEmptyFormFoundsets_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setCreateEmptyFormFoundsets_sam|trigger=none}{code:language=javascript}
//this has to be called in the solution open method
databaseManager.setCreateEmptyFormFoundsets()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=startTransaction|class=node}{tr:id=name}{td}h6.startTransaction{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}startTransaction{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:startTransaction_des|text=|trigger=button}{sub-section}{sub-section:startTransaction_des|trigger=none|class=sIndent}Start a database transaction.
If you want to avoid round trips to the server or avoid the posibility of blocking other clients 
because of your pending changes, you can use databaseManager.setAutoSave(false/true) and databaseManager.rollbackEditedRecords().

startTransaction, commit/rollbackTransacton() does support rollbacking of record deletes which autoSave = false doesnt support.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:startTransaction_snc|text=|trigger=button}{sub-section}{sub-section:startTransaction_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:startTransaction_prs|text=|trigger=button}{sub-section}{sub-section:startTransaction_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:startTransaction_ret|text=|trigger=button}{sub-section}{sub-section:startTransaction_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:startTransaction_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:startTransaction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:startTransaction_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:startTransaction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:startTransaction_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:startTransaction_sam|trigger=none}{code:language=javascript}
// starts a database transaction
databaseManager.startTransaction()
//Now let users input data

//when data has been entered do a commit or rollback if the data entry is canceld or the the commit did fail.  
if (cancel || !databaseManager.commitTransaction())
{
	databaseManager.rollbackTransaction();
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=switchServer|class=node}{tr:id=name}{td}h6.switchServer{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}switchServer{span}{span:id=iets|style=float: left;}\(sourceName, destinationName){span}{td}{tr}{tr:id=des}{td}{sub-section:switchServer_des|text=|trigger=button}{sub-section}{sub-section:switchServer_des|trigger=none|class=sIndent}Switches a named server to another named server with the same datamodel (recommended to be used in an onOpen method for a solution).
return true if successful.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:switchServer_snc|text=|trigger=button}{sub-section}{sub-section:switchServer_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:switchServer_prs|text=|trigger=button}{sub-section}{sub-section:switchServer_prs|trigger=none|class=sIndent}\{[String]} sourceName -- The name of the source database server connection
\{[String]} destinationName -- The name of the destination database server connection.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:switchServer_ret|text=|trigger=button}{sub-section}{sub-section:switchServer_ret|trigger=none|class=sIndent}[Boolean] -- true if the switch could be done.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:switchServer_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:switchServer_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:switchServer_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:switchServer_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:switchServer_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:switchServer_sam|trigger=none}{code:language=javascript}
//dynamically changes a server for the entire solution, destination database server must contain the same tables/columns!
//will fail if there is a lock, transaction , if repository_server is used or if destination server is invalid
//in the solution keep using the sourceName every where to reference the server!  
var success = databaseManager.switchServer('crm', 'crm1')
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}