Versions Compared

Key

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

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryGet or set the record index of the dataset.

servoy sSummary12%30%58%height: 30px;3Methods Summaryadds a column with the specified name to the dataset.adds a column with the specified name to the dataset.adds a column with the specified name to the dataset.voidAdd an HTML property to an HTML tag produced in getAsHTML().voidAdd a row to the dataset.voidAdd a row to the dataset.Create a datasource from the data set with specified name and using specified types.Create a datasource from the data set with specified name and using specified types.Create a datasource from the data set with specified name and using specified types.Get the dataset as an html table, do not escape values or spaces, no multi_line_markup, do not add indentation, add column names.Get the dataset as an html table, do not escape spaces, no multi_line_markup, do not add indentation, add column names.Get the dataset as an html table, no multi_line_markup, do not add indentation, add column names.Get the dataset as an html table, do not add indentation, add column names.Get the dataset as an html table, add column names.Get the dataset as an html table.Get the dataset as formatted text.Get the column data of a dataset as an Array.Get a column name based on index.Get the column names of a dataset.Get a column type based on index.Get the database exception if an error occurred.Get the number of columns in the dataset.Get the number of rows in the dataset.Get the row data of a dataset as an Array.Get the value specified by row and column position from the dataset.Return true if there is more data in the resultset then specified by maxReturnedRows at query time.Remove a column by index from the dataset.voidRemove a row from the dataset.voidSet a column name based on index.voidSet the value specified by row and column position from the dataset.voidSort the dataset on the given column (1-based) in ascending or descending.voidSort the dataset using the function as comparator.

propertyservoy sDetail2100%height:30px2Property DetailsrowIndexname

rowIndex

dessIndent
Get or set the record index of the dataset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsaddColumnname

addColumn(name)

dessIndent
adds a column with the specified name to the dataset.
prs

Parameters

sIndentnamecolumn name.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowaddColumnname

addColumn(name, index)

dessIndent
adds a column with the specified name to the dataset.
prs

Parameters

sIndentnamecolumn name.indexcolumn index number between 1 and getMaxColumnIndex().
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addColumnname

addColumn(name, index, type)

dessIndent
adds a column with the specified name to the dataset.
prs

Parameters

sIndentnamecolumn name.indexcolumn index number between 1 and getMaxColumnIndex().typethe type of column, see JSColumn constants.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addHTMLPropertyname

addHTMLProperty(row, col, name, value)

dessIndent
Add an HTML property to an HTML tag produced in getAsHTML().

For row and col parameters use:
1 = applies to the container
0 = applies to all
>0 = applies to specific cell
prs

Parameters

sIndentrowrow numbercolcolumn numbernameString property namevalueString property value
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRowname

addRow(index, array)

dessIndent
Add a row to the dataset.
prs

Parameters

sIndentindexindex to add row (1-based)arrayrow data
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addRowname

addRow(array)

dessIndent
Add a row to the dataset. The row will be added as the last row.
prs

Parameters

sIndentarrayrow data
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createDataSourcename

createDataSource(name)

dessIndent
Create a datasource from the data set with specified name and using specified types.
The types are inferred from the data if possible.

A temporary datasource cannot be removed because once created there may always be forms or relations that refer to it.
When the client exits, all datasources used by that client are removed automatically.

Most resources used by the datasource can be released by deleting all records:
  dataset.removeRow(-1) or databaseManager.getFoundSet(datasource).deleteAllRecords()
prs

Parameters

sIndentnamedatasource name
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createDataSourcename

createDataSource(name, types)

dessIndent
Create a datasource from the data set with specified name and using specified types.

A temporary datasource cannot be removed because once created there may always be forms or relations that refer to it.
When the client exits, all datasources used by that client are removed automatically.

Most resources used by the datasource can be released by deleting all records:
  dataset.removeRow(-1) or databaseManager.getFoundSet(datasource).deleteAllRecords()

A datasource can be reused if the data has the same signature (column names and types).
A new createDataSource() call will clear the datasource contents from a previous call and insert the current data.
prs

Parameters

sIndentnamedatasource nametypesarray of types as defined in JSColumn
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createDataSourcename

createDataSource(name, types, pkNames)

dessIndent
Create a datasource from the data set with specified name and using specified types.

A temporary datasource cannot be removed because once created there may always be forms or relations that refer to it.
When the client exits, all datasources used by that client are removed automatically.

Most resources used by the datasource can be released by deleting all records:
  dataset.removeRow(-1) or databaseManager.getFoundSet(datasource).deleteAllRecords()
prs

Parameters

sIndentnamedatasource nametypesarray of types as defined in JSColumn, when null types are inferred from the query resultpkNamesarray 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
getAsHTMLname

getAsHTML()

dessIndent
Get the dataset as an html table, do not escape values or spaces, no multi_line_markup, do not add indentation, add column names.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsHTMLname

getAsHTML(escape_values)

dessIndent
Get the dataset as an html table, do not escape spaces, no multi_line_markup, do not add indentation, add column names.
prs

Parameters

sIndentescape_valuesif true, replaces illegal HTML characters with corresponding valid escape sequences.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsHTMLname

getAsHTML(escape_values, escape_spaces)

dessIndent
Get the dataset as an html table, no multi_line_markup, do not add indentation, add column names.
prs

Parameters

sIndentescape_valuesif true, replaces illegal HTML characters with corresponding valid escape sequences.escape_spacesif true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsHTMLname

getAsHTML(escape_values, escape_spaces, multi_line_markup)

dessIndent
Get the dataset as an html table, do not add indentation, add column names.
prs

Parameters

sIndentescape_valuesif true, replaces illegal HTML characters with corresponding valid escape sequences.escape_spacesif true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.multi_line_markupif true, multiLineMarkup will enforce new lines that are in the text; single new lines will be replaced by <br>, multiple new lines will be replaced by <p>
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsHTMLname

getAsHTML(escape_values, escape_spaces, multi_line_markup, pretty_indent)

dessIndent
Get the dataset as an html table, add column names.
prs

Parameters

sIndentescape_valuesif true, replaces illegal HTML characters with corresponding valid escape sequences.escape_spacesif true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.multi_line_markupif true, multiLineMarkup will enforce new lines that are in the text; single new lines will be replaced by <br>, multiple new lines will be replaced by <p>pretty_indentif true, adds indentation for more readable HTML code.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsHTMLname

getAsHTML(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)

dessIndent
Get the dataset as an html table.
prs

Parameters

sIndentescape_valuesif true, replaces illegal HTML characters with corresponding valid escape sequences.escape_spacesif true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.multi_line_markupif true, multiLineMarkup will enforce new lines that are in the text; single new lines will be replaced by <br>, multiple new lines will be replaced by <p>pretty_indentif true, adds indentation for more readable HTML code.add_column_namesif false, column headers will not be added to the table.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getAsTextname

getAsText(column_separator, row_separator, value_delimiter, add_column_names)

dessIndent
Get the dataset as formatted text.
prs

Parameters

sIndentcolumn_separatorany specified column separator; examples: tab '\t'; comma ','; semicolon ';'; space ' ' .row_separatorthe specified row separator; examples: new line '\n'.value_delimiterthe specified value delimiter; null means empty string; example: double quote '"'.add_column_namesif true column names will be added as a first row.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnAsArrayname

getColumnAsArray(index)

dessIndent
Get the column data of a dataset as an Array.
prs

Parameters

sIndentindexindex of column (1-based).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnNamename

getColumnName(index)

dessIndent
Get a column name based on index.
prs

Parameters

sIndentindexindex of column (1-based).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnNamesname

getColumnNames()

dessIndent
Get the column names of a dataset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnTypename

getColumnType(index)

dessIndent
Get a column type based on index.
prs

Parameters

sIndentindexindex of column (1-based).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getExceptionname

getException()

dessIndent
Get the database exception if an error occurred.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getMaxColumnIndexname

getMaxColumnIndex()

dessIndent
Get the number of columns in the dataset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getMaxRowIndexname

getMaxRowIndex()

dessIndent
Get the number of rows in the dataset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getRowAsArrayname

getRowAsArray(index)

dessIndent
Get the row data of a dataset as an Array.
prs

Parameters

sIndentindexindex of row (1-based).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getValuename

getValue(row, col)

dessIndent
Get the value specified by row and column position from the dataset.
prs

Parameters

sIndentrowrow number, 1-basedcolcolumn number, 1-based
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hadMoreDataname

hadMoreData()

dessIndent
Return true if there is more data in the resultset then specified by maxReturnedRows at query time.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeColumnname

removeColumn(index)

dessIndent
Remove a column by index from the dataset.
prs

Parameters

sIndentindexindex of column to remove (1-based)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeRowname

removeRow(row)

dessIndent
Remove a row from the dataset.
prs

Parameters

sIndentrowrow index to remove, -1 for all rows
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setColumnNamename

setColumnName(index, columnName)

dessIndent
Set a column name based on index.
prs

Parameters

sIndentindexindex of column (1-based).columnNamenew column name.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setValuename

setValue(row, col, obj)

dessIndent
Set the value specified by row and column position from the dataset.
Use row = -1, to set columnnames.
prs

Parameters

sIndentrowrow number, 1-basedcolcolumn number, 1-basedobjthe value to be stored at the given row and column.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort(col, sort_direction)

dessIndent
Sort the dataset on the given column (1-based) in ascending or descending.
prs

Parameters

sIndentcolcolumn number, 1-basedsort_directionascending (true) or descending (false)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort(comparator)

dessIndent
Sort the dataset using the function as comparator.
The comparator function is called to compare two rows, that are passed as arguments, and
it will return -1/0/1 if the first row is less/equal/greater then the second row.

NOTE: starting with 7.2 release, when called on datasource(foundset) dataset, this function doesn't save the data anymore
prs

Parameters

sIndentcomparatorcomparator function
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow