Child pages
  • JSDataSet

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
Divcache
styleindexdisplay:none

...

iddescription

...

padding0px
width80px

...

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary

...

Table Cell (td)
Number

...

padding0px
width80px

...

true
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;

...

Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
Boolean

...

3Methods Summaryadds a column with the specified name to the dataset.

...

Table Cell (td)
Boolean

...

adds a column with the specified name to the dataset.

...

Table Cell (td)
Boolean

...

...

adds a column with the specified name to the dataset.

...

void

...

...

Table Cell (td)
void

...

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

...

voidAdd a row to the dataset.

...

void

...

Add a row to the dataset.

...

Table Cell (td)
String

...

Create a

...

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

...

Table Cell (td)
String

...

Create a

...

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

...

Table Cell (td)
String

...

Create a

...

datasource from the data set with specified name and using specified types

...

Table Cell (td)
String

...

Table Cell (td)
String

...

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

...

Table Cell (td)
String

...

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

...

Table Cell (td)
String

...

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

...

Table Cell (td)
String

...

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

...

Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getAsHTML(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)
Get the dataset as an html table.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getAsText(column_separator, row_separator, value_delimiter, add_column_names)
Get the dataset as formatted text.
Table Row (tr)
Table Cell (td)
Object[]
Table Cell (td)
getColumnAsArray(index)
Get the column data of a dataset as an Array.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getColumnName(index)
Get a column name based on index.
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
getColumnNames()
Get the column names of a dataset.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
getColumnType(index)
Get a column type based on index.
Table Row (tr)
Table Cell (td)
ServoyException
Table Cell (td)
getException()
Get the database exception if an error occurred.

...

Table Cell (td)
Number

...

Table Cell (td)
Number

...

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

...

Table Cell (td)
Object[]

...

Get the row data of a dataset as an Array.

...

Table Cell (td)
Object

...

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

...

Table Cell (td)
Boolean

...

Table Cell (td)
Boolean

...

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.

...

void

...

Remove a row from the dataset.

...

void

...

Set a column name based on index.

...

void

...

Set the value specified by row and column position from the dataset.

...

Table Cell (td)
void

...

voidSort the dataset on the given column (1-based) in ascending or descending.

...

void

...

id
HTML Table
Sort the dataset using the function as comparator.

...

Table Row (tr)
idname
Table Cell (td)
getAsText
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsText
Span
(column_separator, row_separator, value_delimiter, add_column_names)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as formatted text.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} column_separator - any specified column separator; examples: tab '\t'; comma ','; semicolon ';'; space ' ' .
{String} row_separator - the specified row separator; examples: new line '\n'.
{String} value_delimiter - the specified value delimiter; example: double quote '"'.
{Boolean} add_column_names - if true column names will be added as a first row.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String formatted text.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
//you can create csv or tab delimited results
var csv = dataset.getAsText(',','\n','"',true)
var tab = dataset.getAsText('\t','\n','"',true)

...

classlastDetailRow

...

idgetColumnAsArray-Number
Table Row (tr)
idname
Table Cell (td)
getColumnAsArray
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object[]
Span
stylefont-weight: bold;
getColumnAsArray
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the column data of a dataset as an Array.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of column (1-based).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object[] - Object array of data.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var dataArray = dataset.getColumnAsArray(1); //puts the contents from the first column of the dataset into an array
//once you have it as an array you can loop through it or feed it to a custom valuelist for example

...

classlastDetailRow

...

idgetColumnName-Number
Table Row (tr)
idname
Table Cell (td)
getColumnName
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getColumnName
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get a column name based on index.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of column (1-based).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String column name.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var firstColumName = dataset.getColumnName(1) //retrieves the first columnname into the variable firstColumName
//using a loop you can get all columnames in an array:
var query = 'select * from customers';
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 100);
var colArray = new Array()
for (var i = 1; i <= dataset.getMaxColumnIndex(); i++)
{
	colArray[i-1] = dataset.getColumnName(i)
	//note the -1, because an array is zero based and dataset is 1 based.
}

...

classlastDetailRow

...

idgetColumnNames
Table Row (tr)
idname
Table Cell (td)
getColumnNames
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String[]
Span
stylefont-weight: bold;
getColumnNames
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the column names of a dataset.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String[] - String[] column names
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var query = 'select * from customers';
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 100);
var columnNames = dataset.getColumnNames();

...

classlastDetailRow

...

idgetColumnType-Number
Table Row (tr)
idname
Table Cell (td)
getColumnType
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getColumnType
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get a column type based on index.
Table Row (tr)
idsnc
Table Cell (td)
Since
Div
classsIndent
6.1.4
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of column (1-based).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number - Number the column type (JSColumn constant)
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var firstColumnType = dataset.getColumnType(1) //retrieves the first column's type into the variable firstColumnType
if (firstColumnType == JSColumn.NUMBER) { }

...

classlastDetailRow

...

idgetException
Table Row (tr)
idname
Table Cell (td)
getException
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
ServoyException
Span
stylefont-weight: bold;
getException
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the database exception if an error occurred.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
ServoyException - ServoyException exception or null when not available.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var dbException = dataset.getException();

...

classlastDetailRow

...

idgetMaxColumnIndex
Table Row (tr)
idname
Table Cell (td)
getMaxColumnIndex
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getMaxColumnIndex
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the number of columns in the dataset.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number - int number of columns.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
for (var i = 1; i <= dataset.getMaxColumnIndex(); i++)
{
	colArray[i-1] = dataset.getColumnName(i)
	//have to subtract 1, because an array is zero based and a dataset is 1 based.
}

...

classlastDetailRow

...

idgetMaxRowIndex
Table Row (tr)
idname
Table Cell (td)
getMaxRowIndex
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getMaxRowIndex
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the number of rows in the dataset.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number - int number of rows.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var totalRows = dataset.getMaxRowIndex();

...

classlastDetailRow

...

idgetRowAsArray-Number
Table Row (tr)
idname
Table Cell (td)
getRowAsArray
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object[]
Span
stylefont-weight: bold;
getRowAsArray
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the row data of a dataset as an Array.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of row (1-based).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object[] - Object array of data.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var dataArray = dataset.getRowAsArray(1); //puts the contents from the first row of the dataset into an array
//once you have it as an array you can loop through it

...

classlastDetailRow

...

idgetValue-Number_Number
Table Row (tr)
idname
Table Cell (td)
getValue
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
getValue
Span
(row, col)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the value specified by row and column position from the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} row - row number, 1-based
{Number} col - column number, 1-based
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Object - Object value
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var dataAtRow2Col1 = dataset.getValue(2, 1);

...

classlastDetailRow

...

idhadMoreData
Table Row (tr)
idname
Table Cell (td)
hadMoreData
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
hadMoreData
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Return true if there is more data in the resultset then specified by maxReturnedRows at query time.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - boolean more data available
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var ds = databaseManager.getDataSetByQuery('example_data', 'select order_id from orders', null, 10000)
if (ds.hadMoreData())
{
	// handle large result
}

...

classlastDetailRow

...

idremoveColumn-Number
Table Row (tr)
idname
Table Cell (td)
removeColumn
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
removeColumn
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Remove a column by index from the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of column to remove (1-based)
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - true if succeeded, else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var success = dataset.removeColumn(1); // removes first column

...

classlastDetailRow

...

idremoveRow-Number
Table Row (tr)
idname
Table Cell (td)
removeRow
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
removeRow
Span
(row)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Remove a row from the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} row - row index to remove, -1 for all rows
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
dataset.removeRow(1); //removes the first row
dataset.removeRow(-1); //removes all rows

...

classlastDetailRow

...

idsetColumnName-Number_String
Table Row (tr)
idname
Table Cell (td)
setColumnName
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setColumnName
Span
(index, columnName)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Set a column name based on index.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index of column (1-based).
{String} columnName - new column name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var query = 'select customerid, customername from customers';
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, -1);
dataset.setColumnName(2, 'name_of_customer') // change the column name for second column.

...

classlastDetailRow

...

idsetValue-Number_Number_Object
Table Row (tr)
idname
Table Cell (td)
setValue
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setValue
Span
(row, col, obj)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Set the value specified by row and column position from the dataset.
Use row = -1, to set columnnames.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} row - row number, 1-based
{Number} col - column number, 1-based
{Object} obj - the value to be stored at the given row and column.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
dataset.getValue(2, 1,'data');

...

classlastDetailRow

...

idsort-Number_Boolean
Table Row (tr)
idname
Table Cell (td)
sort
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
sort
Span
(col, sort_direction)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Sort the dataset on the given column (1-based) in ascending or descending.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} col - column number, 1-based
{Boolean} sort_direction - ascending (true) or descending (false)
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// sort using column number
//assuming the variable dataset contains a dataset
dataset.sort(1, false)

...

classlastDetailRow

...

idsort-Function
Table Row (tr)
idname
Table Cell (td)
sort
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
sort
Span
(comparator)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Function} comparator - comparator function
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//sort using comparator
dataset.sort(mySortFunction);

function mySortFunction(r1, r2)
{
	var o = 0;
	if(r1[0] < r2[0])
	{
		o = -1;
	}
	else if(r1[0] > r2[0])
	{
		o = 1;
	}
	return o;
}

...

classlastDetailRow

...

servoy sDetail2Property DetailsrowIndexname

rowIndex

id

des

sIndent
Get or set the record index of the dataset.
idtd
ret

Returns

divsIndentclients

class

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

td

Sample

property

class
Colgroup Tag
Column
padding0px
width100%
Table Row (tr)
style2100%height:30px;
Table Head (th)
colspan1
Table Body (tbody)
idid
Table Row (tr)
Table Cell (td)
Table Row (tr)
Table Cell (td)
Div
class
Table Row (tr)
id
Number
Table Row (tr)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
//to set the rowIndex:
dataset.rowIndex = 1 //sets the rowIndex to the first row (dataset is 1-based)
//to retrieve the rowIndex of the currently selected row
var currRow = dataset.rowIndex
Table Row (tr)
classlastDetailRow
Table Cell (td)

...

idfunction
classservoy sDetail

...

padding0px
width100%
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details

...

idaddColumn-String
Table Row (tr)
idname
Table Cell (td)
addColumn
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
addColumn
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
adds a column with the specified name to the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - column name.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - true if succeeded, else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);

...

classlastDetailRow

...

idaddColumn-String_Number
Table Row (tr)
idname
Table Cell (td)
addColumn
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
addColumn
Span
(name, index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
adds a column with the specified name to the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - column name.
{Number} index - column index number between 1 and getMaxColumnIndex().
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - true if succeeded, else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);

...

classlastDetailRow

...

idaddColumn-String_Number_Number
Table Row (tr)
idname
Table Cell (td)
addColumn
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
addColumn
Span
(name, index, type)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
adds a column with the specified name to the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - column name.
{Number} index - column index number between 1 and getMaxColumnIndex().
{Number} type - the type of column, see JSColumn constants.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean - true if succeeded, else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);

...

classlastDetailRow

...

idaddHTMLProperty-Number_Number_String_String
Table Row (tr)
idname
Table Cell (td)
addHTMLProperty
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addHTMLProperty
Span
(row, col, name, value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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

Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} row - row number
{Number} col - column number
{String} name - String property name
{String} value - String property value
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//adds a container property (to TABLE tag)
dataset.addHTMLProperty(-1,-1,'cellspacing','3');
dataset.addHTMLProperty(-1,-1,'style','border-collapse:collapse;'); //to have a single line border

//adds a row property to all rows (to TR tag)
dataset.addHTMLProperty(0,0,'class','text');

//adds a row property to second row (to TR tag)
dataset.addHTMLProperty(2,0,'class','text');

//adds a column property to all 3rd columns (to TD tag)
dataset.addHTMLProperty(0,3,'class','redcolumn') ;

//adds a specific cell property (to TD tag)
dataset.addHTMLProperty(2,4,'color','blue');

scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

...

classlastDetailRow

...

idaddRow-Number_ObjectArray
Table Row (tr)
idname
Table Cell (td)
addRow
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addRow
Span
(index, array)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Add a row to the dataset.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} index - index to add row (1-based)
{Object[]} array - row data
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
dataset.addRow(new Array(1,2,3,4,5,6,7,7)); //adds a row with 8 columns
dataset.addRow(2, new Array(1,2,3,4,5,6,7,7)); //adds a row with 8 columns at row 2

...

classlastDetailRow

...

idaddRow-ObjectArray
Table Row (tr)
idname
Table Cell (td)
addRow
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
addRow
Span
(array)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Add a row to the dataset. The row will be added as the last row.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Object[]} array - row data
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//assuming the variable dataset contains a dataset
dataset.addRow(new Array(1,2,3,4,5,6,7,7)); //adds a row with 8 columns
dataset.addRow(2, new Array(1,2,3,4,5,6,7,7)); //adds a row with 8 columns at row 2

...

classlastDetailRow

...

idcreateDataSource-String
Table Row (tr)
idname
Table Cell (td)
createDataSource
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
createDataSource
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create a data source from the data set with specified name and using specified types.
The types are inferred from the data if possible.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - data source name
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String uri reference to the created data source.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
ds.addColumn('my_id'); // note: use regular javascript identifiers so they can be used in scripting
ds.addColumn('my_label');
var uri = ds.createDataSource('mydata', [JSColumn.INTEGER, JSColumn.TEXT]);
var jsform = solutionModel.newForm(fname, uri, null, true, 300, 300);

var query = 'select customerid, address, city, country  from customers';
var ds2 = databaseManager.getDataSetByQuery('example_data', query, null, 999);
var uri2 = ds2.createDataSource('mydata2'); // types are inferred from query result

...

classlastDetailRow

...

idcreateDataSource-String_Object
Table Row (tr)
idname
Table Cell (td)
createDataSource
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
createDataSource
Span
(name, types)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create a data source from the data set with specified name and using specified types.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - data source name
{Object} types - array of types as defined in JSColumn
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String uri reference to the created data source.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
ds.addColumn('my_id'); // note: use regular javascript identifiers so they can be used in scripting
ds.addColumn('my_label');
var uri = ds.createDataSource('mydata', [JSColumn.INTEGER, JSColumn.TEXT]);
var jsform = solutionModel.newForm(fname, uri, null, true, 300, 300);

var query = 'select customerid, address, city, country  from customers';
var ds2 = databaseManager.getDataSetByQuery('example_data', query, null, 999);
var uri2 = ds2.createDataSource('mydata2'); // types are inferred from query result

...

classlastDetailRow

...

idcreateDataSource-String_Object_StringArray
Table Row (tr)
idname
Table Cell (td)
createDataSource
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
createDataSource
Span
(name, types, pkNames)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create a data source from the data set with specified name and using specified types, add .
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name - data source name
{Object} types - array of types as defined in JSColumn, when null types are inferred from the query result
{String[]} pkNames - array of pk names, when null a hidden pk-column will be added
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String uri reference to the created data source.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
ds.addColumn('my_id'); // note: use regular javascript identifiers so they can be used in scripting
ds.addColumn('my_label');
var uri = ds.createDataSource('mydata', [JSColumn.INTEGER, JSColumn.TEXT], ['my_id']);
var jsform = solutionModel.newForm(fname, uri, null, true, 300, 300);

var query = 'select customerid, address, city, country  from customers';
var ds2 = databaseManager.getDataSetByQuery('example_data', query, null, 999);
var uri2 = ds2.createDataSource('mydata2', null, ['customerid']); // types are inferred from query result, use customerid as pk

...

classlastDetailRow

...

idgetAsHTML
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table, do not escape values or spaces, no multi_line_markup, do not add indentation, add column names.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsHTML-Boolean
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
(escape_values)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table, do not escape spaces, no multi_line_markup, do not add indentation, add column names.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Boolean} escape_values - if true, replaces illegal HTML characters with corresponding valid escape sequences.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsHTML-Boolean_Boolean
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
(escape_values, escape_spaces)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table, no multi_line_markup, do not add indentation, add column names.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Boolean} escape_values - if true, replaces illegal HTML characters with corresponding valid escape sequences.
{Boolean} escape_spaces - if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsHTML-Boolean_Boolean_Boolean
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
(escape_values, escape_spaces, multi_line_markup)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table, do not add indentation, add column names.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Boolean} escape_values - if true, replaces illegal HTML characters with corresponding valid escape sequences.
{Boolean} escape_spaces - if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
{Boolean} multi_line_markup - if 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>
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsHTML-Boolean_Boolean_Boolean_Boolean
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
(escape_values, escape_spaces, multi_line_markup, pretty_indent)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table, add column names.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Boolean} escape_values - if true, replaces illegal HTML characters with corresponding valid escape sequences.
{Boolean} escape_spaces - if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
{Boolean} multi_line_markup - if 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>
{Boolean} pretty_indent - if true, adds indentation for more readable HTML code.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean
Table Row (tr)
idname
Table Cell (td)
getAsHTML
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getAsHTML
Span
(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the dataset as an html table.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Boolean} escape_values - if true, replaces illegal HTML characters with corresponding valid escape sequences.
{Boolean} escape_spaces - if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
{Boolean} multi_line_markup - if 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>
{Boolean} pretty_indent - if true, adds indentation for more readable HTML code.
{Boolean} add_column_names - if false, column headers will not be added to the table.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String - String html.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//gets a dataset based on a query
//useful to limit the number of rows
var maxReturnedRows = 10;
var query = 'select c1,c2,c3 from test_table where start_date = ?';

//to access data by name, do not use '.' or special characters in names or aliases
var args = new Array();
args[0] = order_date //or new Date();
var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),query,args,maxReturnedRows);

// gets a dataset with escape values; escape spaces (lines will not wrap); no multi-line markup; with pretty indentation; shows column names
var htmlTable = dataset.getAsHTML(true, true, false, true, true);

//assigns the dataset to a field and sets the display type to HTML_AREA
//assuming the html_field is a global text variable
scopes.globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.

...

classlastDetailRow

...

idgetAsText-String_String_String_Boolean
sIdentjavascriptlastDetailRow

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