Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
iddoc
titleRefresh page
showDatetrue

servoy sReturnTypes2100%height: 30px;2Return TypessWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCK

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryEnable/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.

servoy sSummary12%30%58%height: 30px;3Methods SummaryRequest lock(s) for a foundset, can be a normal or related foundset.Request lock(s) for a foundset, can be a normal or related foundset.Adds a filter to all the foundsets based on a table.Adds a filter to all the foundsets based on a table.Adds a filter to all the foundsets based on a table.Adds a filter to all the foundsets based on a table.voidAdd tracking info used in the log table.Returns true if a transaction is committed; rollback if commit fails.Returns true if a transaction is committed; rollback if commit fails.Returns true if a transaction is committed; rollback if commit fails.Creates a foundset that combines all the records of the specified one-to-many relation seen from the given parent/primary foundset.Creates a foundset that combines all the records of the specified one-to-many relation seen from the given parent/primary foundset.Converts the argument to a JSDataSet, possible use in controller.Converts the argument to a JSDataSet, possible use in controller.Converts the argument to a JSDataSet, possible use in controller.Converts the argument to a JSDataSet, possible use in controller.Converts the argument to a JSDataSet, possible use in controller.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).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).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).Performs a query and saves the result in a datasource.Performs a query and saves the result in a datasource.Performs a query and saves the result in a datasource.Performs a query and saves the result in a datasource.Performs a sql query on the specified server, saves the the result in a datasource.Performs a sql query on the specified server, saves the the result in a datasource.Performs a sql query on the specified server, saves the the result in a datasource.Returns an empty dataset object.Returns an empty dataset object.Returns an empty dataset object.Create a QueryBuilder object for a datasource.Create a QueryBuilder object for a datasource with given table alias.Check wether a data source exists.Returns true or false if autosave is enabled or disabled.Retrieves a list with names of all database servers that have property DataModelCloneFrom equal to the server name parameter.Performs a sql query with a query builder object.Performs a sql query with a query builder object.Performs a sql query on the specified server, returns the result in a dataset.Returns the datasource corresponding to the given server/table.Returns the server name from the datasource, or null if not a database datasource.Returns the table name from the datasource, or null if not a database datasource.Returns the database product name as supplied by the driver for a server.Returns an array of edited records with outstanding (unsaved) data.Returns an array of edited records with outstanding (unsaved) data.Returns an array of records that fail after a save.Returns an array of records that fail after a save.Returns a foundset object for a specified pk query.Returns a foundset object for a specified datasource or server and tablename.Returns a foundset object for a specified datasource or server and tablename.Returns the total number of records in a foundset.Returns a JSFoundsetUpdater object that can be used to update all or a specific number of rows in the specified foundset.Gets the next sequence for a column which has a sequence defined in its column dataprovider properties.Returns the internal SQL which defines the specified (related)foundset.Returns the internal SQL which defines the specified (related)foundset.Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.Returns the internal SQL parameters, as an array, that are used to define the specified (related)foundset.Returns an array with all the server names used in the solution.Returns the JSTable object from which more info can be obtained (like columns).Returns the JSTable object from which more info can be obtained (like columns).Returns the JSTable object from which more info can be obtained (like columns).Returns the JSTable object from which more info can be obtained (like columns).Returns the total number of records(rows) in a table.Returns a two dimensional array object containing the table filter information currently applied to the servers tables.Returns a two dimensional array object containing the table filter information currently applied to the servers tables.Returns an array of all table names for a specified server.Returns an array of all view names for a specified server.Returns true if the current client has any or the specified lock(s) acquired.Returns true if the current client has any or the specified lock(s) acquired.Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.Returns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.Returns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes.Returns true if the (related)foundset exists and has records.Returns true if the (related)foundset exists and has records.Returns true if there is an transaction active for this client.Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record.Merge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record.voidCan be used to recalculate a specified record or all rows in the specified foundset.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.Release all current locks the client has (optionally limited to named locks).Release all current locks the client has (optionally limited to named locks).Removes a previously defined table filter.voidReverts outstanding (not saved) in memory changes from edited records.voidReverts outstanding (not saved) in memory changes from edited records.voidRollback a transaction started by databaseManager.voidRollback a transaction started by databaseManager.voidRollback a transaction started by databaseManager.Saves all outstanding (unsaved) data and exits the current record.Saves all outstanding (unsaved) data and exits the current record.Saves all outstanding (unsaved) data and exits the current record.Set autosave, if false then no saves will happen by the ui (not including deletes!).voidTurnoff the initial form foundset record loading, set this in the solution open method.voidStart a database transaction.Switches a named server to another named server with the same datamodel (recommended to be used in an onOpen method for a solution).

propertyservoy sDetail2100%height:30px2Property DetailsnullColumnValidatorEnabledname

nullColumnValidatorEnabled

dessIndentEnable/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.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 

functionservoy sDetail2100%height:30px2Methods DetailsacquireLockname

acquireLock(foundset, recordIndex)

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

Parameters

sIndentfoundsetThe JSFoundset to get the lock forrecordIndexThe record index which should be locked.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow acquireLockname

acquireLock(foundset, recordIndex, lockName)

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

Parameters

sIndentfoundsetThe JSFoundset to get the lock forrecordIndexThe record index which should be locked.lockNameThe name of the lock.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
addTableFilterParamname

addTableFilterParam(datasource, dataprovider, operator, value)

dessIndentAdds a filter to all the foundsets based on a table. Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name. A dataprovider can have multiple filters defined, they will all be applied. returns true if the tablefilter could be applied.prs

Parameters

sIndentdatasourceThe datasourcedataproviderA specified dataprovider column name.operatorOne of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null).valueThe specified filter value.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
addTableFilterParamname

addTableFilterParam(datasource, dataprovider, operator, value, filterName)

dessIndentAdds a filter to all the foundsets based on a table. Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name. A dataprovider can have multiple filters defined, they will all be applied. returns true if the tablefilter could be applied.prs

Parameters

sIndentdatasourceThe datasourcedataproviderA specified dataprovider column name.operatorOne of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null).valueThe specified filter value.filterNameThe specified name of the database table filter.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
addTableFilterParamname

addTableFilterParam(serverName, tableName, dataprovider, operator, value)

dessIndentAdds a filter to all the foundsets based on a table. Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name. A dataprovider can have multiple filters defined, they will all be applied. returns true if the tablefilter could be applied.prs

Parameters

sIndentserverNameThe name of the database server connection for the specified table name.tableNameThe name of the specified table.dataproviderA specified dataprovider column name.operatorOne of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null).valueThe specified filter value.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
addTableFilterParamname

addTableFilterParam(serverName, tableName, dataprovider, operator, value, filterName)

dessIndentAdds a filter to all the foundsets based on a table. Note: if null is provided as the tablename the filter will be applied on all tables with the dataprovider name. A dataprovider can have multiple filters defined, they will all be applied. returns true if the tablefilter could be applied.prs

Parameters

sIndentserverNameThe name of the database server connection for the specified table name.tableNameThe name of the specified table.dataproviderA specified dataprovider column name.operatorOne of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null).valueThe specified filter value.filterNameThe specified name of the database table filter.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
addTrackingInfoname

addTrackingInfo(columnName, value)

dessIndentAdd tracking info used in the log table. When tracking is enabled and a new row is inserted in the log table, if it has a column named 'columnName', its value will be set with 'value'prs

Parameters

sIndentcolumnNameThe name of the column in the log table, used for tracking infovalueThe value to be set when inserting a new row in the log table, for the 'columnName' column
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
commitTransactionname

commitTransaction()

dessIndentReturns true if a transaction is committed; rollback if commit fails. Saves all edited records and commits the data.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
commitTransactionname

commitTransaction(saveFirst)

dessIndentReturns true if a transaction is committed; rollback if commit fails.prs

Parameters

sIndentsaveFirstsave edited records to the database first (default true)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
commitTransactionname

commitTransaction(saveFirst, revertSavedRecords)

dessIndentReturns true if a transaction is committed; rollback if commit fails.prs

Parameters

sIndentsaveFirstsave edited records to the database first (default true)revertSavedRecordsif a commit fails and a rollback is done, the when given false the records are not reverted to the database state (and are in edited records again)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertFoundSetname

convertFoundSet(foundset, related)

dessIndentCreates a foundset that combines all the records of the specified one-to-many relation seen from the given parent/primary foundset. The created foundset will not contain records that have not been saved in the database, because the records in the foundset will be the result of a select query to the database.prs

Parameters

sIndentfoundsetThe JSFoundset to convert.relatedcan be a one-to-many relation object or the name of a one-to-many relation
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertFoundSetname

convertFoundSet(foundset, related)

dessIndentCreates a foundset that combines all the records of the specified one-to-many relation seen from the given parent/primary foundset. The created foundset will not contain records that have not been saved in the database, because the records in the foundset will be the result of a select query to the database.prs

Parameters

sIndentfoundsetThe JSFoundset to convert.relatedthe name of a one-to-many relation
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertToDataSetname

convertToDataSet(foundset)

dessIndentConverts the argument to a JSDataSet, possible use in controller.loadRecords(dataset). The optional array of dataprovider names is used (only) to add the specified dataprovider names as columns to the dataset.prs

Parameters

sIndentfoundsetThe foundset to be converted.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertToDataSetname

convertToDataSet(foundset, dataproviderNames)

dessIndentConverts the argument to a JSDataSet, possible use in controller.loadRecords(dataset). The optional array of dataprovider names is used (only) to add the specified dataprovider names as columns to the dataset.prs

Parameters

sIndentfoundsetThe foundset to be converted.dataproviderNamesArray with column names.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertToDataSetname

convertToDataSet(values)

dessIndentConverts the argument to a JSDataSet, possible use in controller.loadRecords(dataset). The optional array of dataprovider names is used (only) to add the specified dataprovider names as columns to the dataset.prs

Parameters

sIndentvaluesThe values array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertToDataSetname

convertToDataSet(values, dataproviderNames)

dessIndentConverts the argument to a JSDataSet, possible use in controller.loadRecords(dataset). The optional array of dataprovider names is used (only) to add the specified dataprovider names as columns to the dataset.prs

Parameters

sIndentvaluesThe values array.dataproviderNamesThe property names array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
convertToDataSetname

convertToDataSet(ids)

dessIndentConverts the argument to a JSDataSet, possible use in controller.loadRecords(dataset). The optional array of dataprovider names is used (only) to add the specified dataprovider names as columns to the dataset.prs

Parameters

sIndentidsConcatenated values to be put into dataset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
copyMatchingFieldsname

copyMatchingFields(source, destination)

dessIndentCopies 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). The matching requires the properties and getter functions of the source to match those of the destination; for the getter functions, the 'get' will be removed and the remaining name will be converted to lowercase before attempting to match. Returns true if no error occurred. 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. Before trying this example, please make sure that the foundsets have some records loaded:prs

Parameters

sIndentsourceThe source record or (java/javascript)object to be copied.destinationThe destination record to copy to.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
copyMatchingFieldsname

copyMatchingFields(source, destination, overwrite)

dessIndentCopies 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). The matching requires the properties and getter functions of the source to match those of the destination; for the getter functions, the 'get' will be removed and the remaining name will be converted to lowercase before attempting to match. Returns true if no error occurred. 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. Before trying this example, please make sure that the foundsets have some records loaded:prs

Parameters

sIndentsourceThe source record or (java/javascript)object to be copied.destinationThe destination record to copy to.overwriteBoolean values to overwrite all values. If overwrite is false/not provided, then the non empty values are not overwritten in the destination record.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
copyMatchingFieldsname

copyMatchingFields(source, destination, names)

dessIndentCopies 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). The matching requires the properties and getter functions of the source to match those of the destination; for the getter functions, the 'get' will be removed and the remaining name will be converted to lowercase before attempting to match. Returns true if no error occurred. 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. Before trying this example, please make sure that the foundsets have some records loaded:prs

Parameters

sIndentsourceThe source record or (java/javascript)object to be copied.destinationThe destination record to copy to.namesThe property names that shouldn't be overriden.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, query, useTableFilters, max_returned_rows, types, pkNames)

dessIndentPerforms a query and saves the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnameData source namequeryThe query builder to be executed.useTableFiltersuse table filters (default true).max_returned_rowsThe maximum number of rows returned by the query.typesThe column types, when null the types are inferred from the query.pkNamesarray of pk names, when null a hidden pk-column will be added
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, query, max_returned_rows)

dessIndentPerforms a query and saves the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnamedata source namequeryThe query builder to be executed.max_returned_rowsThe maximum number of rows returned by the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, query, max_returned_rows, types)

dessIndentPerforms a query and saves the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. Using this variation of createDataSourceByQuery any Tablefilter on the involved tables will be taken into account. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnameData source namequeryThe query builder to be executed.max_returned_rowsThe maximum number of rows returned by the query.typesThe column types
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, query, max_returned_rows, types, pkNames)

dessIndentPerforms a query and saves the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. Using this variation of createDataSourceByQuery any Tablefilter on the involved tables will be taken into account. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnameData source namequeryThe query builder to be executed.max_returned_rowsThe maximum number of rows returned by the query.typesThe column typespkNamesarray of pk names, when null a hidden pk-column will be added
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, server_name, sql_query, arguments, max_returned_rows)

dessIndentPerforms a sql query on the specified server, saves the the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. Using this variation of createDataSourceByQuery any Tablefilter on the involved tables will be disregarded. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnamedata source nameserver_nameThe name of the server where the query should be executed.sql_queryThe custom sql.argumentsSpecified arguments or null if there are no arguments.max_returned_rowsThe maximum number of rows returned by the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, server_name, sql_query, arguments, max_returned_rows, types)

dessIndentPerforms a sql query on the specified server, saves the the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. Using this variation of createDataSourceByQuery any Tablefilter on the involved tables will be disregarded. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnamedata source nameserver_nameThe name of the server where the query should be executed.sql_queryThe custom sql.argumentsSpecified arguments or null if there are no arguments.max_returned_rowsThe maximum number of rows returned by the query.typesThe column types
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createDataSourceByQueryname

createDataSourceByQuery(name, server_name, sql_query, arguments, max_returned_rows, types, pkNames)

dessIndentPerforms a sql query on the specified server, saves the the result in a datasource. Will throw an exception if anything went wrong when executing the query. Column types in the datasource are inferred from the query result or can be explicitly specified. Using this variation of createDataSourceByQuery any Tablefilter on the involved tables will be disregarded. A datasource can be reused if the data has the same signature (column names and types). A new createDataSourceByQuery() call will clear the datasource contents from a previous call and insert the current data.prs

Parameters

sIndentnamedata source nameserver_nameThe name of the server where the query should be executed.sql_queryThe custom sql.argumentsSpecified arguments or null if there are no arguments.max_returned_rowsThe maximum number of rows returned by the query.typesThe column typespkNamesarray of pk names, when null a hidden pk-column will be added
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createEmptyDataSetname

createEmptyDataSet()

dessIndentReturns an empty dataset object.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createEmptyDataSetname

createEmptyDataSet(rowCount, columnCount)

dessIndentReturns an empty dataset object.prs

Parameters

sIndentrowCountThe number of rows in the DataSet object.columnCountNumber of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createEmptyDataSetname

createEmptyDataSet(rowCount, columnNames)

dessIndentReturns an empty dataset object.prs

Parameters

sIndentrowCount&nbsp;columnNames&nbsp;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createSelectname

createSelect(dataSource)

dessIndentCreate a QueryBuilder object for a datasource.prs

Parameters

sIndentdataSourceThe data source to build a query for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
createSelectname

createSelect(dataSource, tableAlias)

dessIndentCreate a QueryBuilder object for a datasource with given table alias. The alias can be used inside custom queries to bind to the outer table.prs

Parameters

sIndentdataSourceThe data source to build a query for.tableAliasThe alias for the main table.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
dataSourceExistsname

dataSourceExists(datasource)

dessIndentCheck wether a data source exists. This function can be used for any type of data source (db-based, in-memory).prs

Parameters

sIndentdatasource&nbsp;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getAutoSavename

getAutoSave()

dessIndentReturns true or false if autosave is enabled or disabled.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataModelClonesFromname

getDataModelClonesFrom(serverName)

dessIndentRetrieves a list with names of all database servers that have property DataModelCloneFrom equal to the server name parameter.prs

Parameters

sIndentserverName&nbsp;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSetByQueryname

getDataSetByQuery(query, useTableFilters, max_returned_rows)

dessIndentPerforms a sql query with a query builder object. Will throw an exception if anything did go wrong when executing the query.prs

Parameters

sIndentqueryQBSelect query.useTableFiltersuse table filters (default true).max_returned_rowsThe maximum number of rows returned by the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSetByQueryname

getDataSetByQuery(query, max_returned_rows)

dessIndentPerforms a sql query with a query builder object. Will throw an exception if anything did go wrong when executing the query. Using this variation of getDataSetByQuery any Tablefilter on the involved tables will be taken into account.prs

Parameters

sIndentqueryQBSelect query.max_returned_rowsThe maximum number of rows returned by the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSetByQueryname

getDataSetByQuery(server_name, sql_query, arguments, max_returned_rows)

dessIndentPerforms 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. Using this variation of getDataSetByQuery any Tablefilter on the involved tables will be disregarded.prs

Parameters

sIndentserver_nameThe name of the server where the query should be executed.sql_queryThe custom sql.argumentsSpecified arguments or null if there are no arguments.max_returned_rowsThe maximum number of rows returned by the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSourcename

getDataSource(serverName, tableName)

dessIndentReturns the datasource corresponding to the given server/table.prs

Parameters

sIndentserverNameThe name of the table's server.tableNameThe table's name.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSourceServerNamename

getDataSourceServerName(dataSource)

dessIndentReturns the server name from the datasource, or null if not a database datasource.prs

Parameters

sIndentdataSourceThe datasource string to get the server name from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSourceTableNamename

getDataSourceTableName(dataSource)

dessIndentReturns the table name from the datasource, or null if not a database datasource.prs

Parameters

sIndentdataSourceThe datasource string to get the tablename from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDatabaseProductNamename

getDatabaseProductName(serverName)

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

Parameters

sIndentserverNameThe specified name of the database server connection.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getEditedRecordsname

getEditedRecords()

dessIndentReturns an array of edited records with outstanding (unsaved) data. This is different form JSRecord.isEditing() because this call actually checks if there are changes between the current record data and the stored data in the database. If there are no changes then the record is removed from the edited records list (so after this call JSRecord.isEditing() can return false when it returned true just before this call) NOTE: To return a dataset of outstanding (unsaved) edited data for each record, see JSRecord.getChangedData(); NOTE2: The fields focus may be lost in user interface in order to determine the edits.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getEditedRecordsname

getEditedRecords(foundset)

dessIndentReturns an array of edited records with outstanding (unsaved) data. NOTE: To return a dataset of outstanding (unsaved) edited data for each record, see JSRecord.getChangedData(); NOTE2: The fields focus may be lost in user interface in order to determine the edits.prs

Parameters

sIndentfoundsetreturn edited records in the foundset only.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFailedRecordsname

getFailedRecords()

dessIndentReturns an array of records that fail after a save.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFailedRecordsname

getFailedRecords(foundset)

dessIndentReturns an array of records that fail after a save.prs

Parameters

sIndentfoundsetreturn failed records in the foundset only.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFoundSetname

getFoundSet(query)

dessIndentReturns a foundset object for a specified pk query.prs

Parameters

sIndentqueryThe query to get the JSFoundset for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFoundSetname

getFoundSet(dataSource)

dessIndentReturns a foundset object for a specified datasource or server and tablename. Alternative method: datasources.db.server_name.table_name.getFoundSet() or datasources.mem['ds'].getFoundSet()prs

Parameters

sIndentdataSourceThe datasource to get a JSFoundset for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFoundSetname

getFoundSet(serverName, tableName)

dessIndentReturns a foundset object for a specified datasource or server and tablename.prs

Parameters

sIndentserverNameThe servername to get a JSFoundset for.tableNameThe tablename for that server
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFoundSetCountname

getFoundSetCount(foundset)

dessIndentReturns the total number of records in a foundset. NOTE: This can be an expensive operation (time-wise) if your resultset is large.prs

Parameters

sIndentfoundsetThe JSFoundset to get the count for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getFoundSetUpdatername

getFoundSetUpdater(foundset)

dessIndentReturns a JSFoundsetUpdater object that can be used to update all or a specific number of rows in the specified foundset.prs

Parameters

sIndentfoundsetThe foundset to update.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getNextSequencename

getNextSequence(dataSource, columnName)

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

Parameters

sIndentdataSourceThe datasource that points to the table which has the column with the sequence, or the name of the server where the table can be found. If the name of the server is specified, then a second optional parameter specifying the name of the table must be used. If the datasource is specified, then the name of the table is not needed as the second argument.columnNameThe name of the column that has a sequence defined in its properties.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getSQLname

getSQL(foundsetOrQBSelect)

dessIndentReturns the internal SQL which defines the specified (related)foundset. Table filters are on by default. Make sure to set the applicable filters when the sql is used in a loadRecords() call.prs

Parameters

sIndentfoundsetOrQBSelectThe JSFoundset or QBSelect to get the sql for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getSQLname

getSQL(foundsetOrQBSelect, includeFilters)

dessIndentReturns the internal SQL which defines the specified (related)foundset. Optionally, the foundset and table filter params can be excluded in the sql (includeFilters=false). Make sure to set the applicable filters when the sql is used in a loadRecords() call. When the founset is in find mode, the find conditions are included in the resulting query.prs

Parameters

sIndentfoundsetOrQBSelectThe JSFoundset or QBSelect to get the sql for.includeFiltersinclude the foundset and table filters.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getSQLParametersname

getSQLParameters(foundsetOrQBSelect)

dessIndentReturns the internal SQL parameters, as an array, that are used to define the specified (related)foundset. Parameters for the filters are included.prs

Parameters

sIndentfoundsetOrQBSelectThe JSFoundset or QBSelect to get the sql parameters for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getSQLParametersname

getSQLParameters(foundsetOrQBSelect, includeFilters)

dessIndentReturns the internal SQL parameters, as an array, that are used to define the specified (related)foundset. When the founset is in find mode, the arguments for the find conditions are included in the result.prs

Parameters

sIndentfoundsetOrQBSelectThe JSFoundset or QBSelect to get the sql parameters for.includeFiltersinclude the parameters for the filters.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getServerNamesname

getServerNames()

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

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTablename

getTable(foundset)

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

Parameters

sIndentfoundsetThe foundset where the JSTable can be get from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTablename

getTable(record)

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

Parameters

sIndentrecordThe record where the table can be get from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTablename

getTable(dataSource)

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

Parameters

sIndentdataSourceThe datasource where the table can be get from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTablename

getTable(serverName, tableName)

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

Parameters

sIndentserverNameServer name.tableNameTable name.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTableCountname

getTableCount(dataSource)

dessIndentReturns the total number of records(rows) in a table. NOTE: This can be an expensive operation (time-wise) if your resultset is largeprs

Parameters

sIndentdataSourceData where a server table can be get from. Can be a foundset, a datasource name or a JSTable.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTableFilterParamsname

getTableFilterParams(serverName)

dessIndentReturns 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,tablefilernameprs

Parameters

sIndentserverNameThe name of the database server connection.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTableFilterParamsname

getTableFilterParams(serverName, filterName)

dessIndentReturns 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,tablefilernameprs

Parameters

sIndentserverNameThe name of the database server connection.filterNameThe filter name for which to get the array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTableNamesname

getTableNames(serverName)

dessIndentReturns an array of all table names for a specified server.prs

Parameters

sIndentserverNameThe server name to get the table names from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getViewNamesname

getViewNames(serverName)

dessIndentReturns an array of all view names for a specified server.prs

Parameters

sIndentserverNameThe server name to get the view names from.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasLocksname

hasLocks()

dessIndentReturns true if the current client has any or the specified lock(s) acquired.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasLocksname

hasLocks(lockName)

dessIndentReturns true if the current client has any or the specified lock(s) acquired.prs

Parameters

sIndentlockNameThe lock name to check.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasNewRecordsname

hasNewRecords(foundset)

dessIndentReturns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.prs

Parameters

sIndentfoundsetThe JSFoundset to test.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasNewRecordsname

hasNewRecords(foundset, index)

dessIndentReturns true if the argument (foundSet / record) has at least one row that was not yet saved in the database.prs

Parameters

sIndentfoundsetThe JSFoundset to test.indexThe record index in the foundset to test (not specified means has the foundset any new records)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasRecordChangesname

hasRecordChanges(foundset)

dessIndentReturns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes. NOTE: The fields focus may be lost in user interface in order to determine the edits.prs

Parameters

sIndentfoundsetThe JSFoundset to test if it has changes.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasRecordChangesname

hasRecordChanges(foundset, index)

dessIndentReturns true if the specified foundset, on a specific index or in any of its records, or the specified record has changes. NOTE: The fields focus may be lost in user interface in order to determine the edits.prs

Parameters

sIndentfoundsetThe JSFoundset to test if it has changes.indexThe record index in the foundset to test (not specified means has the foundset any changed records)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasRecordsname

hasRecords(foundset)

dessIndentReturns true if the (related)foundset exists and has records.prs

Parameters

sIndentfoundsetA JSFoundset to test.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasRecordsname

hasRecords(record, relationString)

dessIndentReturns true if the (related)foundset exists and has records.prs

Parameters

sIndentrecordA JSRecord to test.relationStringThe relation name.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
hasTransactionname

hasTransaction()

dessIndentReturns true if there is an transaction active for this client.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
mergeRecordsname

mergeRecords(sourceRecord, combinedDestinationRecord)

dessIndentMerge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record. Do use a transaction! This function is very handy in situations where duplicate data exists. It allows you to merge the two records and move all related records in one go. Say the source_record is "Ikea" and the combined_destination_record is "IKEA", the "Ikea" record is deleted and all records related to it (think of contacts and orders, for instance) will be related to the "IKEA" record. The function takes an optional array of column names. If provided, the data in the named columns will be copied from source_record to combined_destination_record. Note that it is essential for both records to originate from the same foundset, as shown in the sample code.prs

Parameters

sIndentsourceRecordThe source JSRecord to copy from.combinedDestinationRecordThe target/destination JSRecord to copy into.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
mergeRecordsname

mergeRecords(sourceRecord, combinedDestinationRecord, columnNames)

dessIndentMerge records from the same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record. Do use a transaction! This function is very handy in situations where duplicate data exists. It allows you to merge the two records and move all related records in one go. Say the source_record is "Ikea" and the combined_destination_record is "IKEA", the "Ikea" record is deleted and all records related to it (think of contacts and orders, for instance) will be related to the "IKEA" record. The function takes an optional array of column names. If provided, the data in the named columns will be copied from source_record to combined_destination_record. Note that it is essential for both records to originate from the same foundset, as shown in the sample code.prs

Parameters

sIndentsourceRecordThe source JSRecord to copy from.combinedDestinationRecordThe target/destination JSRecord to copy into.columnNamesThe column names array that should be copied.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
recalculatename

recalculate(foundsetOrRecord)

dessIndentCan be used to recalculate a specified record or all rows in the specified foundset. May be necessary when data is changed from outside of servoy, or when there is data changed inside servoy but records with calculations depending on that data where not loaded so not updated and you need to update the stored calculation values because you are depending on that with queries or aggregates.prs

Parameters

sIndentfoundsetOrRecordJSFoundset or JSRecord to recalculate.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
refreshRecordFromDatabasename

refreshRecordFromDatabase(foundset, index)

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

Parameters

sIndentfoundsetThe JSFoundset to refreshindexThe index of the JSRecord that must be refreshed (or -1 for all).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
releaseAllLocksname

releaseAllLocks()

dessIndentRelease all current locks the client has (optionally limited to named locks). return true if the locks are released.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
releaseAllLocksname

releaseAllLocks(lockName)

dessIndentRelease all current locks the client has (optionally limited to named locks). return true if the locks are released.prs

Parameters

sIndentlockNameThe lock name to release.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
removeTableFilterParamname

removeTableFilterParam(serverName, filterName)

dessIndentRemoves a previously defined table filter.prs

Parameters

sIndentserverNameThe name of the database server connection.filterNameThe name of the filter that should be removed.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
revertEditedRecordsname

revertEditedRecords()

dessIndentReverts outstanding (not saved) in memory changes from edited records. Can specify a record or foundset as parameter to rollback. Best used in combination with the function databaseManager.setAutoSave() This does not include deletes, they do not honor the autosafe false flag so they cant be rollbacked by this call.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
revertEditedRecordsname

revertEditedRecords(foundset)

dessIndentReverts outstanding (not saved) in memory changes from edited records. Can specify a record or foundset as parameter to rollback. Best used in combination with the function databaseManager.setAutoSave() This does not include deletes, they do not honor the autosafe false flag so they cant be rollbacked by this call.prs

Parameters

sIndentfoundsetA JSFoundset to revert.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
rollbackTransactionname

rollbackTransaction()

dessIndentRollback a transaction started by databaseManager.startTransaction(). Note that when autosave is false, revertEditedRecords() will not handle deleted records, while rollbackTransaction() does. Also, rollbackEditedRecords() is called before rolling back the transaction see rollbackTransaction(boolean) to controll that behavior and saved records within the transactions are restored to the database values, so user input is lost, to control this see rollbackTransaction(boolean,boolean)ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
rollbackTransactionname

rollbackTransaction(rollbackEdited)

dessIndentRollback a transaction started by databaseManager.startTransaction(). Note that when autosave is false, revertEditedRecords() will not handle deleted records, while rollbackTransaction() does. Also, saved records within the transactions are restored to the database values, so user input is lost, to controll this see rollbackTransaction(boolean,boolean)prs

Parameters

sIndentrollbackEditedcall rollbackEditedRecords() before rolling back the transaction
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
rollbackTransactionname

rollbackTransaction(rollbackEdited, revertSavedRecords)

dessIndentRollback a transaction started by databaseManager.startTransaction(). Note that when autosave is false, revertEditedRecords() will not handle deleted records, while rollbackTransaction() does.prs

Parameters

sIndentrollbackEditedcall rollbackEditedRecords() before rolling back the transactionrevertSavedRecordsif false then all records in the transaction do keep the user input and are back in the edited records list. Note that if the pks of such a record are no longer used by it's foundset (find/search or load by query or ...) it will just be rolled-back as it can't be put in editing records list.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
saveDataname

saveData()

dessIndentSaves all outstanding (unsaved) data and exits the current record. Optionally, by specifying a record or foundset, can save a single record or all records from foundset instead of all the data. NOTE: The fields focus may be lost in user interface in order to determine the edits. SaveData called from table events (like afterRecordInsert) is only partially supported depeding on how first saveData (that triggers the event) is called. If first saveData is called with no arguments, all saveData from table events are returning immediatelly with true value and records will be saved as part of first save. If first saveData is called with record(s) as arguments, saveData from table event will try to save record(s) from arguments that are different than those in first call. SaveData with no arguments inside table events will always return true without saving anything.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
saveDataname

saveData(foundset)

dessIndentSaves all outstanding (unsaved) data and exits the current record. Optionally, by specifying a record or foundset, can save a single record or all records from foundset instead of all the data. NOTE: The fields focus may be lost in user interface in order to determine the edits. SaveData called from table events (like afterRecordInsert) is only partially supported depeding on how first saveData (that triggers the event) is called. If first saveData is called with no arguments, all saveData from table events are returning immediatelly with true value and records will be saved as part of first save. If first saveData is called with record(s) as arguments, saveData from table event will try to save record(s) from arguments that are different than those in first call. SaveData with no arguments inside table events will always return true without saving anything.prs

Parameters

sIndentfoundsetThe JSFoundset to save.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
saveDataname

saveData(record)

dessIndentSaves all outstanding (unsaved) data and exits the current record. Optionally, by specifying a record or foundset, can save a single record or all records from foundset instead of all the data. NOTE: The fields focus may be lost in user interface in order to determine the edits. SaveData called from table events (like afterRecordInsert) is only partially supported depeding on how first saveData (that triggers the event) is called. If first saveData is called with no arguments, all saveData from table events are returning immediatelly with true value and records will be saved as part of first save. If first saveData is called with record(s) as arguments, saveData from table event will try to save record(s) from arguments that are different than those in first call. SaveData with no arguments inside table events will always return true without saving anything.prs

Parameters

sIndentrecordThe JSRecord to save.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
setAutoSavename

setAutoSave(autoSave)

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

Parameters

sIndentautoSaveBoolean to enable or disable autosave.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
setCreateEmptyFormFoundsetsname

setCreateEmptyFormFoundsets()

dessIndentTurnoff 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 recordsret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
startTransactionname

startTransaction()

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

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
switchServername

switchServer(sourceName, destinationName)

dessIndentSwitches a named server to another named server with the same datamodel (recommended to be used in an onOpen method for a solution). return true if successful. Note that this only works if source and destination server are of the same database type.prs

Parameters

sIndentsourceNameThe name of the source database server connectiondestinationNameThe name of the destination database server connection.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;