{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: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}[COLUMNTYPE]{span}{td}{tr}{table}\\{table:class=servoy sSummery}{colgroup}{column: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:class=servoy sSummery}{colgroup}{column: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, record_index, lock_name)
Request lock(s) for a foundset, can be a normal or related foundset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addTableFilterParam]\(server_name, table_name, dataprovider, operator, value, filter_name)
Adds a filter to all the foundsets based on a 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}[JSFoundset]{td}{td}[#convertFoundSet]\(foundset, relation)
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]\(array/ids_string/foundset, array_with_dataprovider_names)
Converts the argument to a JSDataSet, possible use in controller.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#copyMatchingColumns]\(src_record, dest_record, overwrite/array_of_names_not_overwritten)
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}[JSDataSet]{td}{td}[#createEmptyDataSet]\(row_count, columnCount/array_with_column_names)
Returns an empty dataset object.{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]\(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}[#getFailedRecords]\()
Returns an array of records that fail after a save.{td}{tr}{tbody}{tbody}{tr}{td}[JSFoundset]{td}{td}[#getFoundSet]\(server_name/data_source, table_name)
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}Object[]{td}{td}[#getFoundSetDataProviderAsArray]\(foundset, dataprovider)
Returns a foundset dataprovider (normally a column) as JavaScript array.{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]\(serverName, tableName, 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}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}[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/record/datasource/server_name, table_name)
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]\(server_name, filter_name)
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]\(lock_name)
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/record, 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}[#hasRecordChanges]\(foundset/record, 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}[#hasRecords]\(foundset/record, qualifiedRelationString)
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]\(source_record, combined_destination_record, columnnamesarray_to_copy)
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]\(lock_name)
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}[#rollbackEditedRecords]\()
Rolls back in memory edited records that are outstanding (not saved).{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#rollbackTransaction]\()
Rollback a transaction started by databaseManager.{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 onLoad method for a solution).{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=5B833DD9-90D9-4647-9E57-08B63478EBCE}{tr:id=name}{td}h6.nullColumnValidatorEnabled{td}{tr}{tr:id=des}{td}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_des|text=|trigger=button}{sub-section}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_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=prs}{td}*Parameters*\\{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_ret|text=|trigger=button}{sub-section}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_see|text=|trigger=button}{sub-section}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_see|text=|trigger=button}{sub-section}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_sam|text=|trigger=button}{sub-section}{sub-section:5B833DD9-90D9-4647-9E57-08B63478EBCE_sam|class=sIndent|trigger=none}{code:language=javascript}
databaseManager.nullColumnValidatorEnabled = false;//disable

//test if enabled
if(databaseManager.nullColumnValidatorEnabled) application.output('null validation enabled')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=833B58F2-2FE5-4896-B6C7-E92737906021}{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, record_index, lock_name){span}{td}{tr}{tr:id=des}{td}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_des|text=|trigger=button}{sub-section}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_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}{tr:id=prs}{td}*Parameters*\\{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_prs|trigger=none}foundset -- The JSFoundset to get the lock for
record_index -- The record index which should be locked.
\[lock_name\] -- The name of the lock.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_ret|text=|trigger=button}{sub-section}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_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:833B58F2-2FE5-4896-B6C7-E92737906021_see|text=|trigger=button}{sub-section}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_see|text=|trigger=button}{sub-section}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_sam|text=|trigger=button}{sub-section}{sub-section:833B58F2-2FE5-4896-B6C7-E92737906021_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB}{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;}\(server_name, table_name, dataprovider, operator, value, filter_name){span}{td}{tr}{tr:id=des}{td}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_des|text=|trigger=button}{sub-section}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_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
returns true if the tablefilter could be applied.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_prs|trigger=none}server_name -- The name of the database server connection for the specified table name.
table_name -- The name of the specified table.
dataprovider -- A specified dataprovider column name.
operator -- One of "=, <, >, >=, <=, !=, LIKE, or IN".
value -- The specified filter value.
\[filter_name\] -- The specified name of the database table filter.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_ret|text=|trigger=button}{sub-section}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_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:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_see|text=|trigger=button}{sub-section}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_see|text=|trigger=button}{sub-section}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_sam|text=|trigger=button}{sub-section}{sub-section:DEBE3E8D-FBDA-40B1-89C5-9D2D19513EAB_sam|class=sIndent|trigger=none}{code:language=javascript}
//best way to call this in a global solution startup method
var success = databaseManager.addTableFilterParam('admin', 'messages', 'messagesid', '>', 10, 'higNumberedMessagesRule')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F4B6B8F4-2133-4A20-AF20-A5DC3717F145}{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:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_des|text=|trigger=button}{sub-section}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_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=prs}{td}*Parameters*\\{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_ret|text=|trigger=button}{sub-section}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_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:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_see|text=|trigger=button}{sub-section}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_see|text=|trigger=button}{sub-section}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_sam|text=|trigger=button}{sub-section}{sub-section:F4B6B8F4-2133-4A20-AF20-A5DC3717F145_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F75E27E1-163E-4374-8A2E-D5A6221FFB59}{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, relation){span}{td}{tr}{tr:id=des}{td}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_des|text=|trigger=button}{sub-section}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_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}{tr:id=prs}{td}*Parameters*\\{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_prs|trigger=none}foundset -- The JSFoundset to convert.
relation -- can be a one-to-many relation object or the name of a one-to-many relation
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_ret|text=|trigger=button}{sub-section}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_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:F75E27E1-163E-4374-8A2E-D5A6221FFB59_see|text=|trigger=button}{sub-section}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_see|text=|trigger=button}{sub-section}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_sam|text=|trigger=button}{sub-section}{sub-section:F75E27E1-163E-4374-8A2E-D5A6221FFB59_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F6888B5C-11C7-465A-BF7F-42908FFFBC4C}{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;}\(array/ids_string/foundset, array_with_dataprovider_names){span}{td}{tr}{tr:id=des}{td}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_des|text=|trigger=button}{sub-section}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_des|trigger=none|class=sIndent}Converts the argument to a JSDataSet, possible use in controller.loadRecords(dataset){sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_prs|trigger=none}array/ids_string/foundset -- The data that should go into the JSDataSet.
\[array_with_dataprovider_names\] -- Array with column names.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_ret|text=|trigger=button}{sub-section}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_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:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_see|text=|trigger=button}{sub-section}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_see|text=|trigger=button}{sub-section}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_sam|text=|trigger=button}{sub-section}{sub-section:F6888B5C-11C7-465A-BF7F-42908FFFBC4C_sam|class=sIndent|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,new Array('product_id','product_name'));
// 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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9936122E-A79C-4AA4-9396-8F0DE5D57A57}{tr:id=name}{td}h6.copyMatchingColumns{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}copyMatchingColumns{span}{span:id=iets|style=float: left;}\(src_record, dest_record, overwrite/array_of_names_not_overwritten){span}{td}{tr}{tr:id=des}{td}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_des|text=|trigger=button}{sub-section}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_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}{tr:id=prs}{td}*Parameters*\\{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_prs|trigger=none}src_record -- The source record to be copied.
dest_record -- The destination record to copy to.
\[overwrite/array_of_names_not_overwritten\] -- true (default false) if everything can be overwritten or an array of names that shouldnt be overwritten.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_ret|text=|trigger=button}{sub-section}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_ret|trigger=none|class=sIndent}[Boolean] -- true if no errors happend.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_see|text=|trigger=button}{sub-section}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_see|text=|trigger=button}{sub-section}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_sam|text=|trigger=button}{sub-section}{sub-section:9936122E-A79C-4AA4-9396-8F0DE5D57A57_sam|class=sIndent|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.copyMatchingColumns(srcRecord,destRecord,true)
}
//saves any outstanding changes to the dest foundset
controller.saveData();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=21EFD797-C9D6-468E-B37D-B939A456DC48}{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;}\(row_count, columnCount/array_with_column_names){span}{td}{tr}{tr:id=des}{td}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_des|text=|trigger=button}{sub-section}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_des|trigger=none|class=sIndent}Returns an empty dataset object.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_prs|trigger=none}row_count -- The number of rows in the DataSet object.
columnCount/array_with_column_names -- Number of columns or the column names.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_ret|text=|trigger=button}{sub-section}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_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:21EFD797-C9D6-468E-B37D-B939A456DC48_see|text=|trigger=button}{sub-section}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_see|text=|trigger=button}{sub-section}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_sam|text=|trigger=button}{sub-section}{sub-section:21EFD797-C9D6-468E-B37D-B939A456DC48_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B05EC4B0-8FF3-4FB0-8868-88F823E2AF79}{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:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_des|text=|trigger=button}{sub-section}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_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=prs}{td}*Parameters*\\{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_ret|text=|trigger=button}{sub-section}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_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:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_see|text=|trigger=button}{sub-section}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_see|text=|trigger=button}{sub-section}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_sam|text=|trigger=button}{sub-section}{sub-section:B05EC4B0-8FF3-4FB0-8868-88F823E2AF79_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=84D9E720-852F-49E9-805E-867930C78C73}{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:84D9E720-852F-49E9-805E-867930C78C73_des|text=|trigger=button}{sub-section}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_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}{tr:id=prs}{td}*Parameters*\\{sub-section:84D9E720-852F-49E9-805E-867930C78C73_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_prs|trigger=none}server_name -- The name of the server where the query should be executed.
sql_query -- The custom sql.
arguments -- Specified arguments or null if there are no arguments.
max_returned_rows -- The maximum number of rows returned by the query.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:84D9E720-852F-49E9-805E-867930C78C73_ret|text=|trigger=button}{sub-section}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_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:84D9E720-852F-49E9-805E-867930C78C73_see|text=|trigger=button}{sub-section}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:84D9E720-852F-49E9-805E-867930C78C73_see|text=|trigger=button}{sub-section}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:84D9E720-852F-49E9-805E-867930C78C73_sam|text=|trigger=button}{sub-section}{sub-section:84D9E720-852F-49E9-805E-867930C78C73_sam|class=sIndent|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(controller.getServerName(), 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(controller.getServerName(), 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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=67DE7C04-07F8-4EEE-93DD-1D2250FD76CA}{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:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_des|text=|trigger=button}{sub-section}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_des|trigger=none|class=sIndent}Returns the server name from the datasource, or null if not a database datasource.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_prs|trigger=none}dataSource -- The datasource string to get the server name from.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_ret|text=|trigger=button}{sub-section}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_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:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_see|text=|trigger=button}{sub-section}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_see|text=|trigger=button}{sub-section}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_sam|text=|trigger=button}{sub-section}{sub-section:67DE7C04-07F8-4EEE-93DD-1D2250FD76CA_sam|class=sIndent|trigger=none}{code:language=javascript}
var servername = databaseManager.getDataSourceServerName(datasource);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17}{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:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_des|text=|trigger=button}{sub-section}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_des|trigger=none|class=sIndent}Returns the table name from the datasource, or null if not a database datasource.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_prs|trigger=none}dataSource -- The datasource string to get the tablename from.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_ret|text=|trigger=button}{sub-section}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_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:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_see|text=|trigger=button}{sub-section}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_see|text=|trigger=button}{sub-section}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_sam|text=|trigger=button}{sub-section}{sub-section:F6F29E1D-DAC1-4547-9B87-0E2C9CEA8C17_sam|class=sIndent|trigger=none}{code:language=javascript}
var tablename = databaseManager.getDataSourceTableName(datasource);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AA4348F4-3202-4AFE-98D3-10A46D4FC021}{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:AA4348F4-3202-4AFE-98D3-10A46D4FC021_des|text=|trigger=button}{sub-section}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_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}{tr:id=prs}{td}*Parameters*\\{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_prs|trigger=none}serverName -- The specified name of the database server connection.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_ret|text=|trigger=button}{sub-section}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_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:AA4348F4-3202-4AFE-98D3-10A46D4FC021_see|text=|trigger=button}{sub-section}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_see|text=|trigger=button}{sub-section}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_sam|text=|trigger=button}{sub-section}{sub-section:AA4348F4-3202-4AFE-98D3-10A46D4FC021_sam|class=sIndent|trigger=none}{code:language=javascript}
var databaseProductName = databaseManager.getDatabaseProductName(servername)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33}{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:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_des|text=|trigger=button}{sub-section}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_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();{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_ret|text=|trigger=button}{sub-section}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_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:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_see|text=|trigger=button}{sub-section}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_see|text=|trigger=button}{sub-section}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_sam|text=|trigger=button}{sub-section}{sub-section:6E1D0DA1-D2EB-4B9E-AD59-F494D6B66E33_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1E6CA22D-7777-41AE-AED2-AA90AC681D0A}{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:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_des|text=|trigger=button}{sub-section}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_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=prs}{td}*Parameters*\\{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_ret|text=|trigger=button}{sub-section}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_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:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_see|text=|trigger=button}{sub-section}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_see|text=|trigger=button}{sub-section}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_sam|text=|trigger=button}{sub-section}{sub-section:1E6CA22D-7777-41AE-AED2-AA90AC681D0A_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=29CAB89A-0783-4313-B550-4A0A414B89B5}{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;}\(server_name/data_source, table_name){span}{td}{tr}{tr:id=des}{td}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_des|text=|trigger=button}{sub-section}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_des|trigger=none|class=sIndent}Returns a foundset object for a specified datasource or server and tablename.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_prs|trigger=none}server_name/data_source -- The servername or datasource to get a JSFoundset for.
\[table_name\] -- The tablename of the first param was the servername.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_ret|text=|trigger=button}{sub-section}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_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:29CAB89A-0783-4313-B550-4A0A414B89B5_see|text=|trigger=button}{sub-section}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_see|text=|trigger=button}{sub-section}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_sam|text=|trigger=button}{sub-section}{sub-section:29CAB89A-0783-4313-B550-4A0A414B89B5_sam|class=sIndent|trigger=none}{code:language=javascript}
var fs = databaseManager.getFoundSet(controller.getDataSource())
var ridx = fs.newRecord()
var record = fs.getRecord(ridx)
record.emp_name = 'John'
databaseManager.saveData()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=747E8618-68DE-4E16-AF28-D137B208DF81}{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:747E8618-68DE-4E16-AF28-D137B208DF81_des|text=|trigger=button}{sub-section}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_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}{tr:id=prs}{td}*Parameters*\\{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_prs|trigger=none}foundset -- The JSFoundset to get the count for.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_ret|text=|trigger=button}{sub-section}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_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:747E8618-68DE-4E16-AF28-D137B208DF81_see|text=|trigger=button}{sub-section}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_see|text=|trigger=button}{sub-section}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_sam|text=|trigger=button}{sub-section}{sub-section:747E8618-68DE-4E16-AF28-D137B208DF81_sam|class=sIndent|trigger=none}{code:language=javascript}
//return the total number of records in a foundset.
databaseManager.getFoundSetCount(foundset);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0881EFB2-CFF1-412E-BC8F-A7974F80FEC2}{tr:id=name}{td}h6.getFoundSetDataProviderAsArray{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}Object[]{span}{span:id=iets|style=float: left; font-weight: bold;}getFoundSetDataProviderAsArray{span}{span:id=iets|style=float: left;}\(foundset, dataprovider){span}{td}{tr}{tr:id=des}{td}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_des|text=|trigger=button}{sub-section}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_des|trigger=none|class=sIndent}Returns a foundset dataprovider (normally a column) as JavaScript array.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_prs|trigger=none}foundset -- The foundset
dataprovider -- The dataprovider for the values of the array.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_ret|text=|trigger=button}{sub-section}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_ret|trigger=none|class=sIndent}Object[] -- An Array with the column values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_see|text=|trigger=button}{sub-section}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_see|text=|trigger=button}{sub-section}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_sam|text=|trigger=button}{sub-section}{sub-section:0881EFB2-CFF1-412E-BC8F-A7974F80FEC2_sam|class=sIndent|trigger=none}{code:language=javascript}
// returns an array with all order_id values of the specified foundset. 
var array = databaseManager.getFoundSetDataProviderAsArray(foundset,'order_id');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9D745097-F4C0-4B91-8461-C9853D3F845D}{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:9D745097-F4C0-4B91-8461-C9853D3F845D_des|text=|trigger=button}{sub-section}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_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}{tr:id=prs}{td}*Parameters*\\{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_prs|trigger=none}foundset -- The foundset to update.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_ret|text=|trigger=button}{sub-section}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_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:9D745097-F4C0-4B91-8461-C9853D3F845D_see|text=|trigger=button}{sub-section}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_see|text=|trigger=button}{sub-section}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_sam|text=|trigger=button}{sub-section}{sub-section:9D745097-F4C0-4B91-8461-C9853D3F845D_sam|class=sIndent|trigger=none}{code:language=javascript}
//There are 3 types of possible use with the foundset updater
//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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C2A6F21E-D227-40DE-B121-88CA5EE0DA34}{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;}\(serverName, tableName, columnName){span}{td}{tr}{tr:id=des}{td}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_des|text=|trigger=button}{sub-section}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_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}{tr:id=prs}{td}*Parameters*\\{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_prs|trigger=none}serverName -- The name of the server
tableName -- The name of the table
columnName -- The name of the column
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_ret|text=|trigger=button}{sub-section}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_ret|trigger=none|class=sIndent}Object -- The next sequence for the column, null if there was no sequence for that column.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_see|text=|trigger=button}{sub-section}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_see|text=|trigger=button}{sub-section}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_sam|text=|trigger=button}{sub-section}{sub-section:C2A6F21E-D227-40DE-B121-88CA5EE0DA34_sam|class=sIndent|trigger=none}{code:language=javascript}
var seq = databaseManager.getNextSequence(controller.getServerName(),controller.getTableName(),'myColumnWithSequenceAttached')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=216176F0-524D-4865-A06F-C29E7F0DFB17}{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:216176F0-524D-4865-A06F-C29E7F0DFB17_des|text=|trigger=button}{sub-section}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_des|trigger=none|class=sIndent}Returns the internal SQL which defines the specified (related)foundset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_prs|trigger=none}foundset -- The JSFoundset to get the sql for.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_ret|text=|trigger=button}{sub-section}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_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:216176F0-524D-4865-A06F-C29E7F0DFB17_see|text=|trigger=button}{sub-section}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_see|text=|trigger=button}{sub-section}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_sam|text=|trigger=button}{sub-section}{sub-section:216176F0-524D-4865-A06F-C29E7F0DFB17_sam|class=sIndent|trigger=none}{code:language=javascript}
var sql = databaseManager.getSQL(foundset)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4C7C8029-7780-4E78-B61F-6E3EB21F48C6}{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:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_des|text=|trigger=button}{sub-section}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_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}{tr:id=prs}{td}*Parameters*\\{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_prs|trigger=none}foundset -- The JSFoundset to get the sql parameters for.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_ret|text=|trigger=button}{sub-section}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_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:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_see|text=|trigger=button}{sub-section}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_see|text=|trigger=button}{sub-section}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_sam|text=|trigger=button}{sub-section}{sub-section:4C7C8029-7780-4E78-B61F-6E3EB21F48C6_sam|class=sIndent|trigger=none}{code:language=javascript}
var sqlParameterArray = databaseManager.getSQLParameters(foundset)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D0CFCB9B-7D91-4DDD-97DC-6413992555A9}{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:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_des|text=|trigger=button}{sub-section}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_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=prs}{td}*Parameters*\\{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_ret|text=|trigger=button}{sub-section}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_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:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_see|text=|trigger=button}{sub-section}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_see|text=|trigger=button}{sub-section}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_sam|text=|trigger=button}{sub-section}{sub-section:D0CFCB9B-7D91-4DDD-97DC-6413992555A9_sam|class=sIndent|trigger=none}{code:language=javascript}
var array = databaseManager.getServerNames()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209}{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/record/datasource/server_name, table_name){span}{td}{tr}{tr:id=des}{td}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_des|text=|trigger=button}{sub-section}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_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}{tr:id=prs}{td}*Parameters*\\{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_prs|trigger=none}foundset/record/datasource/server_name -- The data where the JSTable can be get from.
\[table_name\] -- The tablename of the first param is a servername string.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_ret|text=|trigger=button}{sub-section}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_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:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_see|text=|trigger=button}{sub-section}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_see|text=|trigger=button}{sub-section}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_sam|text=|trigger=button}{sub-section}{sub-section:3DD0D5A0-9BC9-4623-87B3-D24F9FAC4209_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3101C803-3F6A-48A6-8D45-754FA077CCB3}{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:3101C803-3F6A-48A6-8D45-754FA077CCB3_des|text=|trigger=button}{sub-section}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_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}{tr:id=prs}{td}*Parameters*\\{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_prs|trigger=none}dataSource -- Data where a server table can be get from. Can be a foundset, a datasource name or a JSTable.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_ret|text=|trigger=button}{sub-section}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_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:3101C803-3F6A-48A6-8D45-754FA077CCB3_see|text=|trigger=button}{sub-section}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_see|text=|trigger=button}{sub-section}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_sam|text=|trigger=button}{sub-section}{sub-section:3101C803-3F6A-48A6-8D45-754FA077CCB3_sam|class=sIndent|trigger=none}{code:language=javascript}
//return the total number of rows in a table.
var count = databaseManager.getTableCount(foundset);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BB90349F-6F03-4785-80FA-5CFE435CB70D}{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;}\(server_name, filter_name){span}{td}{tr}{tr:id=des}{td}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_des|text=|trigger=button}{sub-section}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_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}{tr:id=prs}{td}*Parameters*\\{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_prs|trigger=none}server_name -- The name of the database server connection.
\[filter_name\] -- The filter name for which to get the array.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_ret|text=|trigger=button}{sub-section}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_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:BB90349F-6F03-4785-80FA-5CFE435CB70D_see|text=|trigger=button}{sub-section}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_see|text=|trigger=button}{sub-section}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_sam|text=|trigger=button}{sub-section}{sub-section:BB90349F-6F03-4785-80FA-5CFE435CB70D_sam|class=sIndent|trigger=none}{code:language=javascript}
var params = databaseManager.getTableFilterParams(controller.getServerName())
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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=51792675-9F0E-4FE0-ABE9-DD2C1E1601A1}{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:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_des|text=|trigger=button}{sub-section}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_des|trigger=none|class=sIndent}Returns an array of all table names for a specified server.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_prs|trigger=none}serverName -- The server name to get the table names from.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_ret|text=|trigger=button}{sub-section}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_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:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_see|text=|trigger=button}{sub-section}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_see|text=|trigger=button}{sub-section}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_sam|text=|trigger=button}{sub-section}{sub-section:51792675-9F0E-4FE0-ABE9-DD2C1E1601A1_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C38FC948-CCA0-41ED-B7C9-8D1F431C5035}{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:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_des|text=|trigger=button}{sub-section}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_des|trigger=none|class=sIndent}Returns an array of all view names for a specified server.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_prs|trigger=none}serverName -- The server name to get the view names from.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_ret|text=|trigger=button}{sub-section}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_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:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_see|text=|trigger=button}{sub-section}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_see|text=|trigger=button}{sub-section}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_sam|text=|trigger=button}{sub-section}{sub-section:C38FC948-CCA0-41ED-B7C9-8D1F431C5035_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AC6D792F-3D84-46B3-9500-00BF53BF23D6}{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;}\(lock_name){span}{td}{tr}{tr:id=des}{td}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_des|text=|trigger=button}{sub-section}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_des|trigger=none|class=sIndent}Returns true if the current client has any or the specified lock(s) acquired.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_prs|trigger=none}\[lock_name\] -- The lock name to check.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_ret|text=|trigger=button}{sub-section}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_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:AC6D792F-3D84-46B3-9500-00BF53BF23D6_see|text=|trigger=button}{sub-section}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_see|text=|trigger=button}{sub-section}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_sam|text=|trigger=button}{sub-section}{sub-section:AC6D792F-3D84-46B3-9500-00BF53BF23D6_sam|class=sIndent|trigger=none}{code:language=javascript}
var hasLocks = databaseManager.hasLocks('mylock')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=4E5C72AD-731C-48AB-B8BE-D4F7E0767387}{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/record, foundset_index){span}{td}{tr}{tr:id=des}{td}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_des|text=|trigger=button}{sub-section}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_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}{tr:id=prs}{td}*Parameters*\\{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_prs|trigger=none}foundset/record -- The JSFoundset or JSRecord to test.
\[foundset_index\] -- The record index in the foundset to test (not specified means has the foundset any new records)
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_ret|text=|trigger=button}{sub-section}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_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:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_see|text=|trigger=button}{sub-section}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_see|text=|trigger=button}{sub-section}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_sam|text=|trigger=button}{sub-section}{sub-section:4E5C72AD-731C-48AB-B8BE-D4F7E0767387_sam|class=sIndent|trigger=none}{code:language=javascript}
var fs = databaseManager.getFoundSet(controller.getServerName(),'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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=30DFB37F-4DD3-402A-8A57-AF169BBD8200}{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/record, foundset_index){span}{td}{tr}{tr:id=des}{td}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_des|text=|trigger=button}{sub-section}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_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.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_prs|trigger=none}foundset/record -- The JSFoundset or JSRecord to test if it has changes.
\[foundset_index\] -- The record index in the foundset to test (not specified means has the foundset any changed records)
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_ret|text=|trigger=button}{sub-section}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_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:30DFB37F-4DD3-402A-8A57-AF169BBD8200_see|text=|trigger=button}{sub-section}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_see|text=|trigger=button}{sub-section}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_sam|text=|trigger=button}{sub-section}{sub-section:30DFB37F-4DD3-402A-8A57-AF169BBD8200_sam|class=sIndent|trigger=none}{code:language=javascript}
if (databaseManager.hasRecordChanges(foundset,2))
{
	//do save or something else
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8045A1FC-F731-4BE9-859E-4FB6BF2410C3}{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/record, qualifiedRelationString){span}{td}{tr}{tr:id=des}{td}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_des|text=|trigger=button}{sub-section}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_des|trigger=none|class=sIndent}Returns true if the (related)foundset exists and has records.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_prs|trigger=none}foundset/record -- A JSFoundset to test or a JSRecord for which to test a relation
\[qualifiedRelationString\] -- The relationname if the first param is a JSRecord.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_ret|text=|trigger=button}{sub-section}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_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:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_see|text=|trigger=button}{sub-section}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_see|text=|trigger=button}{sub-section}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_sam|text=|trigger=button}{sub-section}{sub-section:8045A1FC-F731-4BE9-859E-4FB6BF2410C3_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EDC7F92E-321B-456A-A27C-AB9EA234F1C6}{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:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_des|text=|trigger=button}{sub-section}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_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=prs}{td}*Parameters*\\{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_ret|text=|trigger=button}{sub-section}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_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:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_see|text=|trigger=button}{sub-section}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_see|text=|trigger=button}{sub-section}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_sam|text=|trigger=button}{sub-section}{sub-section:EDC7F92E-321B-456A-A27C-AB9EA234F1C6_sam|class=sIndent|trigger=none}{code:language=javascript}
var hasTransaction = databaseManager.hasTransaction()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D7E1477B-065A-4216-A5A7-2180865EA57C}{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;}\(source_record, combined_destination_record, columnnamesarray_to_copy){span}{td}{tr}{tr:id=des}{td}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_des|text=|trigger=button}{sub-section}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_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!
returns true if successful.

NOTE: For more information on foreign types, see Properties options: Details in the Dataproviders chapter of the Servoy Developer User's Guid{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_prs|trigger=none}source_record -- The source JSRecord to copy from.
combined_destination_record -- The target/destination JSRecord to copy into.
\[columnnamesarray_to_copy\] -- The column names Array that should be copied.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_ret|text=|trigger=button}{sub-section}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_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:D7E1477B-065A-4216-A5A7-2180865EA57C_see|text=|trigger=button}{sub-section}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_see|text=|trigger=button}{sub-section}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_sam|text=|trigger=button}{sub-section}{sub-section:D7E1477B-065A-4216-A5A7-2180865EA57C_sam|class=sIndent|trigger=none}{code:language=javascript}
databaseManager.mergeRecords(foundset.getRecord(1),foundset.getRecord(2));
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=60A13CC6-640C-4D6D-8D0A-843FC3A11720}{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:60A13CC6-640C-4D6D-8D0A-843FC3A11720_des|text=|trigger=button}{sub-section}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_des|trigger=none|class=sIndent}Can be used to recalculate a specified record or all rows in the specified foundset.
May be necessary when records are inserted in a program external to Servoy.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_prs|trigger=none}foundsetOrRecord -- JSFoundset or JSRecord to recalculate.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_ret|text=|trigger=button}{sub-section}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_see|text=|trigger=button}{sub-section}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_see|text=|trigger=button}{sub-section}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_sam|text=|trigger=button}{sub-section}{sub-section:60A13CC6-640C-4D6D-8D0A-843FC3A11720_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F724E5C7-8919-46A8-82AA-63A45659E6A6}{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:F724E5C7-8919-46A8-82AA-63A45659E6A6_des|text=|trigger=button}{sub-section}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_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}{tr:id=prs}{td}*Parameters*\\{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_prs|trigger=none}foundset -- The JSFoundset to refresh
index -- The index of the JSRecord that must be refreshed (or -1 for all).
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_ret|text=|trigger=button}{sub-section}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_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:F724E5C7-8919-46A8-82AA-63A45659E6A6_see|text=|trigger=button}{sub-section}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_see|text=|trigger=button}{sub-section}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_sam|text=|trigger=button}{sub-section}{sub-section:F724E5C7-8919-46A8-82AA-63A45659E6A6_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0FA89A21-8758-4591-89D8-502F3E05FDCD}{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;}\(lock_name){span}{td}{tr}{tr:id=des}{td}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_des|text=|trigger=button}{sub-section}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_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}{tr:id=prs}{td}*Parameters*\\{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_prs|trigger=none}\[lock_name\] -- The lock name to release.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_ret|text=|trigger=button}{sub-section}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_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:0FA89A21-8758-4591-89D8-502F3E05FDCD_see|text=|trigger=button}{sub-section}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_see|text=|trigger=button}{sub-section}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_sam|text=|trigger=button}{sub-section}{sub-section:0FA89A21-8758-4591-89D8-502F3E05FDCD_sam|class=sIndent|trigger=none}{code:language=javascript}
databaseManager.releaseAllLocks('mylock')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0}{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:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_des|text=|trigger=button}{sub-section}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_des|trigger=none|class=sIndent}Removes a previously defined table filter.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_prs|trigger=none}serverName -- The name of the database server connection.
filterName -- The name of the filter that should be removed.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_ret|text=|trigger=button}{sub-section}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_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:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_see|text=|trigger=button}{sub-section}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_see|text=|trigger=button}{sub-section}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_sam|text=|trigger=button}{sub-section}{sub-section:2AEA007F-96D5-4B75-9EB6-6BEC396C6DE0_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = databaseManager.removeTableFilterParam('admin', 'higNumberedMessagesRule')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0}{tr:id=name}{td}h6.rollbackEditedRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}rollbackEditedRecords{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_des|text=|trigger=button}{sub-section}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_des|trigger=none|class=sIndent}Rolls back in memory edited records that are outstanding (not saved).
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=prs}{td}*Parameters*\\{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_ret|text=|trigger=button}{sub-section}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_see|text=|trigger=button}{sub-section}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_see|text=|trigger=button}{sub-section}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_sam|text=|trigger=button}{sub-section}{sub-section:D8D7DAE8-5E14-40AC-988E-DA18EE1EB2E0_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A}{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:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_des|text=|trigger=button}{sub-section}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_des|trigger=none|class=sIndent}Rollback a transaction started by databaseManager.startTransaction().
Will also rollback deletes that are done between start and a rollback call that are not handled by autosave false and rollbackEditedRecords(){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_ret|text=|trigger=button}{sub-section}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_see|text=|trigger=button}{sub-section}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_see|text=|trigger=button}{sub-section}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_sam|text=|trigger=button}{sub-section}{sub-section:AAB4790B-CB91-465C-BBBA-A5FA26F8DE3A_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=56956640-13F5-4B50-8AD0-D7BDA7142659}{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:56956640-13F5-4B50-8AD0-D7BDA7142659_des|text=|trigger=button}{sub-section}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_des|trigger=none|class=sIndent}Saves all outstanding (unsaved) data and exits the current record. 
Optionally, by specifying a record, can save a single record instead of all the data.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_prs|trigger=none}\[record\] -- The JSRecord to save.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_ret|text=|trigger=button}{sub-section}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_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:56956640-13F5-4B50-8AD0-D7BDA7142659_see|text=|trigger=button}{sub-section}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_see|text=|trigger=button}{sub-section}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_sam|text=|trigger=button}{sub-section}{sub-section:56956640-13F5-4B50-8AD0-D7BDA7142659_sam|class=sIndent|trigger=none}{code:language=javascript}
databaseManager.saveData();
//databaseManager.saveData(foundset.getRecord(1));//save specific record
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=E4FF10AB-1C0D-463B-9277-750F4E464389}{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:E4FF10AB-1C0D-463B-9277-750F4E464389_des|text=|trigger=button}{sub-section}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_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}{tr:id=prs}{td}*Parameters*\\{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_prs|trigger=none}autoSave -- Boolean to enable or disable autosave.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_ret|text=|trigger=button}{sub-section}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_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:E4FF10AB-1C0D-463B-9277-750F4E464389_see|text=|trigger=button}{sub-section}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_see|text=|trigger=button}{sub-section}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_sam|text=|trigger=button}{sub-section}{sub-section:E4FF10AB-1C0D-463B-9277-750F4E464389_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=898ED2FE-BB61-40A0-B890-0358825BD157}{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:898ED2FE-BB61-40A0-B890-0358825BD157_des|text=|trigger=button}{sub-section}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_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=prs}{td}*Parameters*\\{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_ret|text=|trigger=button}{sub-section}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_see|text=|trigger=button}{sub-section}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_see|text=|trigger=button}{sub-section}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_sam|text=|trigger=button}{sub-section}{sub-section:898ED2FE-BB61-40A0-B890-0358825BD157_sam|class=sIndent|trigger=none}{code:language=javascript}
//this has to be called in the solution open method
databaseManager.setCreateEmptyFormFoundsets()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=145AEE9E-63DB-4FC2-A0ED-2962C8E21D89}{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:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_des|text=|trigger=button}{sub-section}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_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=prs}{td}*Parameters*\\{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_ret|text=|trigger=button}{sub-section}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_see|text=|trigger=button}{sub-section}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_see|text=|trigger=button}{sub-section}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_sam|text=|trigger=button}{sub-section}{sub-section:145AEE9E-63DB-4FC2-A0ED-2962C8E21D89_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6}{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:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_des|text=|trigger=button}{sub-section}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_des|trigger=none|class=sIndent}Switches a named server to another named server with the same datamodel (Recommended to be used in an onLoad method for a solution).
return true if successfull.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_prs|trigger=none}sourceName -- The name of the source database server connection
destinationName -- The name of the destination database server connection.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_ret|text=|trigger=button}{sub-section}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_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:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_see|text=|trigger=button}{sub-section}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_see|text=|trigger=button}{sub-section}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_sam|text=|trigger=button}{sub-section}{sub-section:C82C6D1E-A8B4-4C8F-9A7A-9C924D5B4DD6_sam|class=sIndent|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
var success = databaseManager.switchServer('crm', 'crm1')
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}