Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#rowIndex]
Get or set the record index of the dataset.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#addColumn]\(name)
adds a column with the specified name to the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addColumn]\(name, index)
adds a column with the specified name to the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#addColumn]\(name, index, type)
adds a column with the specified name to the dataset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addHTMLProperty]\(row, col, name, value)
Add an HTML property to an HTML tag produced in getAsHTML().{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addRow]\(index, array)
Add a row to the dataset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addRow]\(array)
Add a row to the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#createDataSource]\(name)
Create a data source from the data set with specified name and using specified types.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#createDataSource]\(name, types)
Create a data source from the data set with specified name and using specified types.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\()
Get the dataset as an html table, do not escape values or spaces, no multi\_line\_markup, do not add indentation, add column names.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\(escape_values)
Get the dataset as an html table, do not escape spaces, no multi\_line\_markup, do not add indentation, add column names.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\(escape_values, escape_spaces)
Get the dataset as an html table, no multi\_line\_markup, do not add indentation, add column names.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\(escape_values, escape_spaces, multi_line_markup)
Get the dataset as an html table, do not add indentation, add column names.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\(escape_values, escape_spaces, multi_line_markup, pretty_indent)
Get the dataset as an html table, add column names.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsHTML]\(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names)
Get the dataset as an html table.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getAsText]\(column_separator, row_separator, value_delimiter, add_column_names)
Get the dataset as formatted text.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getColumnAsArray]\(index)
Get the column data of a dataset as an Array.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getColumnName]\(index)
Get a column name based on index.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getColumnType]\(index)
Get a column type based on index.{td}{tr}{tbody}{tbody}{tr}{td}[ServoyException]{td}{td}[#getException]\()
Get the database exception if an error occurred.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getMaxColumnIndex]\()
Get the number of columns in the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getMaxRowIndex]\()
Get the number of rows in the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getRowAsArray]\(index)
Get the row data of a dataset as an Array.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getValue]\(row, col)
Get the value specified by row and column position from the dataset.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hadMoreData]\()
Return true if there is more data in the resultset then specified by maxReturnedRows at query time.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeColumn]\(index)
Remove a column by index from the dataset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeRow]\(row)
Remove a row from the dataset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setColumnName]\(index, columnName)
Set a column name based on index.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setValue]\(row, col, obj)
Set the value specified by row and column position from the dataset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sort]\(col, sort_direction)
Sort the dataset on the given column (1\-based) in ascending or descending.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#sort]\(comparator)
Sort the dataset using the function as comparator.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=rowIndex|class=node}{tr:id=name}{td}h6.rowIndex{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:rowIndex_des|trigger=button|text=}{sub-section}{sub-section:rowIndex_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rowIndex_snc|trigger=button|text=}{sub-section}{sub-section:rowIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:rowIndex_prs|trigger=button|text=}{sub-section}{sub-section:rowIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:rowIndex_ret|trigger=button|text=}{sub-section}{sub-section:rowIndex_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rowIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rowIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rowIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIndex_sam|trigger=none}{code:language=javascript}
//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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=addColumn-String|class=node}{tr:id=name}{td}h6.addColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addColumn{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addColumn-String_des|trigger=button|text=}{sub-section}{sub-section:addColumn-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addColumn-String_snc|trigger=button|text=}{sub-section}{sub-section:addColumn-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addColumn-String_prs|trigger=button|text=}{sub-section}{sub-section:addColumn-String_prs|trigger=none|class=sIndent}\{[String]} name -- column name.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addColumn-String_ret|trigger=button|text=}{sub-section}{sub-section:addColumn-String_ret|trigger=none|class=sIndent}[Boolean] -- true if succeeded, else false.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addColumn-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addColumn-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addColumn-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addColumn-String_Number|class=node}{tr:id=name}{td}h6.addColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addColumn{span}{span:id=iets|style=float: left;}\(name, index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addColumn-String_Number_des|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addColumn-String_Number_snc|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addColumn-String_Number_prs|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_prs|trigger=none|class=sIndent}\{[String]} name -- column name.
\{[Number]} index -- column index number between 1 and getMaxColumnIndex().
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addColumn-String_Number_ret|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_ret|trigger=none|class=sIndent}[Boolean] -- true if succeeded, else false.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addColumn-String_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addColumn-String_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addColumn-String_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addColumn-String_Number_Number|class=node}{tr:id=name}{td}h6.addColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addColumn{span}{span:id=iets|style=float: left;}\(name, index, type){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addColumn-String_Number_Number_des|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addColumn-String_Number_Number_snc|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addColumn-String_Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_Number_prs|trigger=none|class=sIndent}\{[String]} name -- column name.
\{[Number]} index -- column index number between 1 and getMaxColumnIndex().
\{[Number]} type -- the type of column, see JSColumn constants.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addColumn-String_Number_Number_ret|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_Number_ret|trigger=none|class=sIndent}[Boolean] -- true if succeeded, else false.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addColumn-String_Number_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addColumn-String_Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addColumn-String_Number_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_Number_Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addHTMLProperty-Number_Number_String_String|class=node}{tr:id=name}{td}h6.addHTMLProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addHTMLProperty{span}{span:id=iets|style=float: left;}\(row, col, name, value){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addHTMLProperty-Number_Number_String_String_des|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addHTMLProperty-Number_Number_String_String_snc|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addHTMLProperty-Number_Number_String_String_prs|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_prs|trigger=none|class=sIndent}\{[Number]} row -- row number
\{[Number]} col -- column number
\{[String]} name -- String property name
\{[String]} value -- String property value
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addHTMLProperty-Number_Number_String_String_ret|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addHTMLProperty-Number_Number_String_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHTMLProperty-Number_Number_String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addHTMLProperty-Number_Number_String_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHTMLProperty-Number_Number_String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addHTMLProperty-Number_Number_String_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addHTMLProperty-Number_Number_String_String_sam|trigger=none}{code:language=javascript}
//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>';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRow-Number_ObjectArray|class=node}{tr:id=name}{td}h6.addRow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addRow{span}{span:id=iets|style=float: left;}\(index, array){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRow-Number_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:addRow-Number_ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRow-Number_ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:addRow-Number_ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRow-Number_ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:addRow-Number_ObjectArray_prs|trigger=none|class=sIndent}\{[Number]} index -- index to add row (1\-based)
\{[Object]\[]} array -- row data
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRow-Number_ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:addRow-Number_ObjectArray_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRow-Number_ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-Number_ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRow-Number_ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-Number_ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRow-Number_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-Number_ObjectArray_sam|trigger=none}{code:language=javascript}
//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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRow-ObjectArray|class=node}{tr:id=name}{td}h6.addRow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addRow{span}{span:id=iets|style=float: left;}\(array){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:addRow-ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:addRow-ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addRow-ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:addRow-ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addRow-ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:addRow-ObjectArray_prs|trigger=none|class=sIndent}\{[Object]\[]} array -- row data
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addRow-ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:addRow-ObjectArray_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addRow-ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addRow-ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addRow-ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addRow-ObjectArray_sam|trigger=none}{code:language=javascript}
//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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createDataSource-String|class=node}{tr:id=name}{td}h6.createDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createDataSource{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:createDataSource-String_des|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createDataSource-String_snc|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createDataSource-String_prs|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_prs|trigger=none|class=sIndent}\{[String]} name -- data source name
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createDataSource-String_ret|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_ret|trigger=none|class=sIndent}[String] -- String uri reference to the created data source.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createDataSource-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createDataSource-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createDataSource-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_sam|trigger=none}{code:language=javascript}
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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createDataSource-String_Object|class=node}{tr:id=name}{td}h6.createDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createDataSource{span}{span:id=iets|style=float: left;}\(name, types){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:createDataSource-String_Object_des|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:createDataSource-String_Object_snc|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:createDataSource-String_Object_prs|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_Object_prs|trigger=none|class=sIndent}\{[String]} name -- data source name
\{[Object]} types -- array of types as defined in JSColumn
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:createDataSource-String_Object_ret|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_Object_ret|trigger=none|class=sIndent}[String] -- String uri reference to the created data source.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:createDataSource-String_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:createDataSource-String_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:createDataSource-String_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_Object_sam|trigger=none}{code:language=javascript}
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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(escape_values){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML-Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML-Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML-Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} escape_values -- if true, replaces illegal HTML characters with corresponding valid escape sequences.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML-Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML-Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML-Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML-Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(escape_values, escape_spaces){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML-Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML-Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML-Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_prs|trigger=none|class=sIndent}\{[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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML-Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML-Boolean_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML-Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML-Boolean_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(escape_values, escape_spaces, multi_line_markup){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML-Boolean_Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_prs|trigger=none|class=sIndent}\{[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>
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean_Boolean|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(escape_values, escape_spaces, multi_line_markup, pretty_indent){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_prs|trigger=none|class=sIndent}\{[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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean|class=node}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsHTML{span}{span:id=iets|style=float: left;}\(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=none|class=sIndent}\{[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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=none}{code:language=javascript}
//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>'.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsText-String_String_String_Boolean|class=node}{tr:id=name}{td}h6.getAsText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getAsText{span}{span:id=iets|style=float: left;}\(column_separator, row_separator, value_delimiter, add_column_names){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getAsText-String_String_String_Boolean_des|trigger=button|text=}{sub-section}{sub-section:getAsText-String_String_String_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getAsText-String_String_String_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:getAsText-String_String_String_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getAsText-String_String_String_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:getAsText-String_String_String_Boolean_prs|trigger=none|class=sIndent}\{[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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getAsText-String_String_String_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:getAsText-String_String_String_Boolean_ret|trigger=none|class=sIndent}[String] -- String formatted text.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getAsText-String_String_String_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsText-String_String_String_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getAsText-String_String_String_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsText-String_String_String_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getAsText-String_String_String_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getAsText-String_String_String_Boolean_sam|trigger=none}{code:language=javascript}
//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)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getColumnAsArray-Number|class=node}{tr:id=name}{td}h6.getColumnAsArray{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getColumnAsArray{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getColumnAsArray-Number_des|trigger=button|text=}{sub-section}{sub-section:getColumnAsArray-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getColumnAsArray-Number_snc|trigger=button|text=}{sub-section}{sub-section:getColumnAsArray-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getColumnAsArray-Number_prs|trigger=button|text=}{sub-section}{sub-section:getColumnAsArray-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- index of column (1\-based).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getColumnAsArray-Number_ret|trigger=button|text=}{sub-section}{sub-section:getColumnAsArray-Number_ret|trigger=none|class=sIndent}[Object]\[] -- Object array of data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getColumnAsArray-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnAsArray-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getColumnAsArray-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnAsArray-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getColumnAsArray-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnAsArray-Number_sam|trigger=none}{code:language=javascript}
//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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getColumnName-Number|class=node}{tr:id=name}{td}h6.getColumnName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getColumnName{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getColumnName-Number_des|trigger=button|text=}{sub-section}{sub-section:getColumnName-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getColumnName-Number_snc|trigger=button|text=}{sub-section}{sub-section:getColumnName-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getColumnName-Number_prs|trigger=button|text=}{sub-section}{sub-section:getColumnName-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- index of column (1\-based).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getColumnName-Number_ret|trigger=button|text=}{sub-section}{sub-section:getColumnName-Number_ret|trigger=none|class=sIndent}[String] -- String column name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getColumnName-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnName-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getColumnName-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnName-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getColumnName-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnName-Number_sam|trigger=none}{code:language=javascript}
//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.
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getColumnType-Number|class=node}{tr:id=name}{td}h6.getColumnType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getColumnType{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getColumnType-Number_des|trigger=button|text=}{sub-section}{sub-section:getColumnType-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getColumnType-Number_snc|trigger=button|text=}{sub-section}{sub-section:getColumnType-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getColumnType-Number_prs|trigger=button|text=}{sub-section}{sub-section:getColumnType-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- index of column (1\-based).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getColumnType-Number_ret|trigger=button|text=}{sub-section}{sub-section:getColumnType-Number_ret|trigger=none|class=sIndent}[Number] -- Number the column type (JSColumn constant){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getColumnType-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnType-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getColumnType-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnType-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getColumnType-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getColumnType-Number_sam|trigger=none}{code:language=javascript}
//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) { }
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getException|class=node}{tr:id=name}{td}h6.getException{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[ServoyException]{span}{span:id=iets|style=float: left; font-weight: bold;}getException{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getException_des|trigger=button|text=}{sub-section}{sub-section:getException_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getException_snc|trigger=button|text=}{sub-section}{sub-section:getException_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getException_prs|trigger=button|text=}{sub-section}{sub-section:getException_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getException_ret|trigger=button|text=}{sub-section}{sub-section:getException_ret|trigger=none|class=sIndent}[ServoyException] -- ServoyException exception or null when not available.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getException_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getException_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getException_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getException_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getException_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getException_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var dbException = dataset.getException();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMaxColumnIndex|class=node}{tr:id=name}{td}h6.getMaxColumnIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMaxColumnIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getMaxColumnIndex_des|trigger=button|text=}{sub-section}{sub-section:getMaxColumnIndex_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMaxColumnIndex_snc|trigger=button|text=}{sub-section}{sub-section:getMaxColumnIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getMaxColumnIndex_prs|trigger=button|text=}{sub-section}{sub-section:getMaxColumnIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMaxColumnIndex_ret|trigger=button|text=}{sub-section}{sub-section:getMaxColumnIndex_ret|trigger=none|class=sIndent}[Number] -- int number of columns.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMaxColumnIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxColumnIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMaxColumnIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxColumnIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMaxColumnIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxColumnIndex_sam|trigger=none}{code:language=javascript}
//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.
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMaxRowIndex|class=node}{tr:id=name}{td}h6.getMaxRowIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMaxRowIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getMaxRowIndex_des|trigger=button|text=}{sub-section}{sub-section:getMaxRowIndex_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMaxRowIndex_snc|trigger=button|text=}{sub-section}{sub-section:getMaxRowIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getMaxRowIndex_prs|trigger=button|text=}{sub-section}{sub-section:getMaxRowIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMaxRowIndex_ret|trigger=button|text=}{sub-section}{sub-section:getMaxRowIndex_ret|trigger=none|class=sIndent}[Number] -- int number of rows.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMaxRowIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxRowIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMaxRowIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxRowIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMaxRowIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getMaxRowIndex_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var totalRows = dataset.getMaxRowIndex();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRowAsArray-Number|class=node}{tr:id=name}{td}h6.getRowAsArray{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRowAsArray{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getRowAsArray-Number_des|trigger=button|text=}{sub-section}{sub-section:getRowAsArray-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getRowAsArray-Number_snc|trigger=button|text=}{sub-section}{sub-section:getRowAsArray-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getRowAsArray-Number_prs|trigger=button|text=}{sub-section}{sub-section:getRowAsArray-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- index of row (1\-based).
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getRowAsArray-Number_ret|trigger=button|text=}{sub-section}{sub-section:getRowAsArray-Number_ret|trigger=none|class=sIndent}[Object]\[] -- Object array of data.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getRowAsArray-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRowAsArray-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getRowAsArray-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRowAsArray-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getRowAsArray-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getRowAsArray-Number_sam|trigger=none}{code:language=javascript}
//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
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getValue-Number_Number|class=node}{tr:id=name}{td}h6.getValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getValue{span}{span:id=iets|style=float: left;}\(row, col){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getValue-Number_Number_des|trigger=button|text=}{sub-section}{sub-section:getValue-Number_Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getValue-Number_Number_snc|trigger=button|text=}{sub-section}{sub-section:getValue-Number_Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getValue-Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:getValue-Number_Number_prs|trigger=none|class=sIndent}\{[Number]} row -- row number, 1\-based
\{[Number]} col -- column number, 1\-based
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getValue-Number_Number_ret|trigger=button|text=}{sub-section}{sub-section:getValue-Number_Number_ret|trigger=none|class=sIndent}[Object] -- Object value{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getValue-Number_Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getValue-Number_Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getValue-Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getValue-Number_Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getValue-Number_Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getValue-Number_Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var dataAtRow2Col1 = dataset.getValue(2, 1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hadMoreData|class=node}{tr:id=name}{td}h6.hadMoreData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hadMoreData{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:hadMoreData_des|trigger=button|text=}{sub-section}{sub-section:hadMoreData_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hadMoreData_snc|trigger=button|text=}{sub-section}{sub-section:hadMoreData_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:hadMoreData_prs|trigger=button|text=}{sub-section}{sub-section:hadMoreData_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:hadMoreData_ret|trigger=button|text=}{sub-section}{sub-section:hadMoreData_ret|trigger=none|class=sIndent}[Boolean] -- boolean more data available{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hadMoreData_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hadMoreData_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hadMoreData_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hadMoreData_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hadMoreData_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hadMoreData_sam|trigger=none}{code:language=javascript}
var ds = databaseManager.getDataSetByQuery('example_data', 'select order_id from orders', null, 10000)
if (ds.hadMoreData())
{
	// handle large result
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeColumn-Number|class=node}{tr:id=name}{td}h6.removeColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeColumn{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:removeColumn-Number_des|trigger=button|text=}{sub-section}{sub-section:removeColumn-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeColumn-Number_snc|trigger=button|text=}{sub-section}{sub-section:removeColumn-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeColumn-Number_prs|trigger=button|text=}{sub-section}{sub-section:removeColumn-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- index of column to remove (1\-based)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeColumn-Number_ret|trigger=button|text=}{sub-section}{sub-section:removeColumn-Number_ret|trigger=none|class=sIndent}[Boolean] -- true if succeeded, else false.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeColumn-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeColumn-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeColumn-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeColumn-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeColumn-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeColumn-Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.removeColumn(1); // removes first column
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeRow-Number|class=node}{tr:id=name}{td}h6.removeRow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeRow{span}{span:id=iets|style=float: left;}\(row){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:removeRow-Number_des|trigger=button|text=}{sub-section}{sub-section:removeRow-Number_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeRow-Number_snc|trigger=button|text=}{sub-section}{sub-section:removeRow-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeRow-Number_prs|trigger=button|text=}{sub-section}{sub-section:removeRow-Number_prs|trigger=none|class=sIndent}\{[Number]} row -- row index to remove, \-1 for all rows
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeRow-Number_ret|trigger=button|text=}{sub-section}{sub-section:removeRow-Number_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeRow-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeRow-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeRow-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeRow-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeRow-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeRow-Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.removeRow(1); //removes the first row
dataset.removeRow(-1); //removes all rows
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setColumnName-Number_String|class=node}{tr:id=name}{td}h6.setColumnName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setColumnName{span}{span:id=iets|style=float: left;}\(index, columnName){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setColumnName-Number_String_des|trigger=button|text=}{sub-section}{sub-section:setColumnName-Number_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setColumnName-Number_String_snc|trigger=button|text=}{sub-section}{sub-section:setColumnName-Number_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setColumnName-Number_String_prs|trigger=button|text=}{sub-section}{sub-section:setColumnName-Number_String_prs|trigger=none|class=sIndent}\{[Number]} index -- index of column (1\-based).
\{[String]} columnName -- new column name.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setColumnName-Number_String_ret|trigger=button|text=}{sub-section}{sub-section:setColumnName-Number_String_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setColumnName-Number_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setColumnName-Number_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setColumnName-Number_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setColumnName-Number_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setColumnName-Number_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setColumnName-Number_String_sam|trigger=none}{code:language=javascript}
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.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setValue-Number_Number_Object|class=node}{tr:id=name}{td}h6.setValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setValue{span}{span:id=iets|style=float: left;}\(row, col, obj){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setValue-Number_Number_Object_des|trigger=button|text=}{sub-section}{sub-section:setValue-Number_Number_Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setValue-Number_Number_Object_snc|trigger=button|text=}{sub-section}{sub-section:setValue-Number_Number_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setValue-Number_Number_Object_prs|trigger=button|text=}{sub-section}{sub-section:setValue-Number_Number_Object_prs|trigger=none|class=sIndent}\{[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.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setValue-Number_Number_Object_ret|trigger=button|text=}{sub-section}{sub-section:setValue-Number_Number_Object_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setValue-Number_Number_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValue-Number_Number_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setValue-Number_Number_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValue-Number_Number_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setValue-Number_Number_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValue-Number_Number_Object_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.getValue(2, 1,'data');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort-Number_Boolean|class=node}{tr:id=name}{td}h6.sort{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sort{span}{span:id=iets|style=float: left;}\(col, sort_direction){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:sort-Number_Boolean_des|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sort-Number_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:sort-Number_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_prs|trigger=none|class=sIndent}\{[Number]} col -- column number, 1\-based
\{[Boolean]} sort_direction -- ascending (true) or descending (false)
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:sort-Number_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sort-Number_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Number_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sort-Number_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Number_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sort-Number_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Number_Boolean_sam|trigger=none}{code:language=javascript}
// sort using column number
//assuming the variable dataset contains a dataset
dataset.sort(1, false)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort-Function|class=node}{tr:id=name}{td}h6.sort{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}sort{span}{span:id=iets|style=float: left;}\(comparator){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:sort-Function_des|trigger=button|text=}{sub-section}{sub-section:sort-Function_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sort-Function_snc|trigger=button|text=}{sub-section}{sub-section:sort-Function_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:sort-Function_prs|trigger=button|text=}{sub-section}{sub-section:sort-Function_prs|trigger=none|class=sIndent}\{[Function]} comparator -- comparator function
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:sort-Function_ret|trigger=button|text=}{sub-section}{sub-section:sort-Function_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sort-Function_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Function_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sort-Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Function_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sort-Function_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Function_sam|trigger=none}{code:language=javascript}
//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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}