Child pages
  • JSDataSet
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unknown macro: {sub-section}


Unknown macro: {table}
Unknown macro: {colgroup}
Unknown macro: {tr}
Unknown macro: {th}

Property Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

rowIndex
Get or set the record index of the dataset.


Unknown macro: {table}
Unknown macro: {colgroup}
Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

addColumn(name, index, type)
adds a column with the specified name to the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

addHTMLProperty(row, col, name, value)
Add an HTML property to an HTML tag produced in getAsHTML().

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

addRow(index, array)
Add a row to the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

createDataSource(name, types)
Create a data source from the data set with specified name and using specified types.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getAsHTML(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)
Get the dataset as an html table.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getAsText(column_separator, row_separator, value_delimiter, add_column_names)
Get the dataset as formatted text.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Object[]

Unknown macro: {td}

getColumnAsArray(index)
Get the column data of a dataset as an Array.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getColumnName(index)
Get a column name based on index.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

ServoyException

Unknown macro: {td}

getException()
Get the database exception if an error occurred.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

getMaxColumnIndex()
Get the number of columns in the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

getMaxRowIndex()
Get the number of rows in the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Object[]

Unknown macro: {td}

getRowAsArray(index)
Get the row data of a dataset as an Array.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Object

Unknown macro: {td}

getValue(row, col)
Get the value specified by row and column position from the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

hadMoreData()
Return true if there is more data in the resultset then specified by maxReturnedRows at query time.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

removeColumn(index)
Remove a column by index from the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

removeRow(row)
Remove a row from the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setValue(row, col, obj)
Set the value specified by row and column position from the dataset.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

sort(col, sort_direction)
Sort the dataset on the given column in ascending or descending.


Unknown macro: {table}
Unknown macro: {colgroup}
Unknown macro: {tr}
Unknown macro: {th}

Property Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
rowIndex
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get or set the record index of the dataset.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Number

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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
Unknown macro: {tr}
Unknown macro: {td}


Unknown macro: {table}
Unknown macro: {colgroup}
Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
addColumn
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

addColumn

Unknown macro: {span}

(name, index, type)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

adds a column with the specified name to the dataset.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

name – column name.
[index] – column index number between 1 and getMaxColumnIndex().
[type] – the type of column, see JSColumn constants.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Boolean – true if succeeded, else false.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
addHTMLProperty
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

addHTMLProperty

Unknown macro: {span}

(row, col, name, value)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

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

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

row – row number
col – column number
name – String property name
value – String property value

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//adds a container property (to TABLE tag)
dataset.addHTMLProperty(-1,-1,'cellspacing','3');

//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');

globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
addRow
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

addRow

Unknown macro: {span}

(index, array)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Add a row to the dataset.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

[index] – index to add row (1-based), add by default as last row
array – row data

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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 after row 2
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
createDataSource
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

createDataSource

Unknown macro: {span}

(name, types)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

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

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

name – data source name
[types] – array of types as defined in JSColumn, when null or not supplied types are inferred from the data if possible.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String – String uri reference to the created data source.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
ds.addColumn('my_id');
	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
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getAsHTML
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getAsHTML

Unknown macro: {span}

(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the dataset as an html table.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

[escape_values] – if true, replaces illegal HTML characters with corresponding valid escape sequences.
[escape_spaces] – if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
[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>
[pretty_indent] – if true, adds indentation for more readable HTML code.
[add_column_names] – if false, column headers will not be added to the table.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String – String html.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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(controller.getServerName(),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
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>'.
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getAsText
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getAsText

Unknown macro: {span}

(column_separator, row_separator, value_delimiter, add_column_names)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the dataset as formatted text.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

column_separator – any specified column separator; examples: tab '\t'; comma ','; semicolon ';'; space ' ' .
row_separator – the specified row separator; examples: new line '\n'.
value_delimiter – the specified value delimiter; example: double quote '"'.
add_column_names – boolean if true column names will be added as a first row.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String – String formatted text.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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)
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getColumnAsArray
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Object[]

Unknown macro: {span}

getColumnAsArray

Unknown macro: {span}

(index)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the column data of a dataset as an Array.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

index – index of column (1-based).

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Object[] – Object array of data.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getColumnName
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getColumnName

Unknown macro: {span}

(index)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get a column name based on index.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

index – index of column (1-based).

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String – String column name.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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(controller.getServerName(), 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.
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getException
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

ServoyException

Unknown macro: {span}

getException

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the database exception if an error occurred.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

ServoyException – ServoyException exception or null when not available.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
var dbException = dataset.getException();
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getMaxColumnIndex
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Number

Unknown macro: {span}

getMaxColumnIndex

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the number of columns in the dataset.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Number – int number of columns.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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.
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getMaxRowIndex
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Number

Unknown macro: {span}

getMaxRowIndex

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the number of rows in the dataset.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Number – int number of rows.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
var totalRows = dataset.getMaxRowIndex();
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getRowAsArray
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Object[]

Unknown macro: {span}

getRowAsArray

Unknown macro: {span}

(index)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Get the row data of a dataset as an Array.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

index – index of row (1-based).

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Object[] – Object array of data.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//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
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getValue
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Object

Unknown macro: {span}

getValue

Unknown macro: {span}

(row, col)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

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

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

row – row number, 1-based
col – column number, 1-based

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Object – Object value

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
var dataAtRow2Col1 = dataset.getValue(2, 1);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
hadMoreData
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

hadMoreData

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

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

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Boolean – boolean more data available

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var ds = databaseManager.getDataSetByQuery('example_data', 'select order_id from orders', null, 10000)
if (ds.hadMoreData())
{
	// handle large result
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
removeColumn
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

removeColumn

Unknown macro: {span}

(index)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Remove a column by index from the dataset.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

index – index of column to remove (1-based)

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Boolean – true if succeeded, else false.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
var success = dataset.removeColumn(1); // removes first column
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
removeRow
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

removeRow

Unknown macro: {span}

(row)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Remove a row from the dataset.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

row – row index to remove, -1 for all rows

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
dataset.removeRow(1); //removes the first row
dataset.removeRow(-1); //removes all rows
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setValue
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setValue

Unknown macro: {span}

(row, col, obj)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

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

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

row – row number, 1-based
col – column number, 1-based
obj – the value to be stored at the given row and column.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
dataset.getValue(2, 1,'data');
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
sort
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

sort

Unknown macro: {span}

(col, sort_direction)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Sort the dataset on the given column in ascending or descending.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}

col – column number, 1-based
sort_direction – boolean true for ascending, false for descending

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

void

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
//assuming the variable dataset contains a dataset
dataset.sort(1,false)
Unknown macro: {tr}
Unknown macro: {td}
  • No labels