Child pages
  • JSDataSet

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hiddendiv:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACTAUTO CHANGESUPDATE FROM THE PAGECONTENT ANDTHROUGH MERGETHE THEM BACK INTO SERVOY SOURCE{hiddenDOC GENERATOR{div}
{sub-sectiondiv:id=description|text=}{sub-sectiondiv}\\ 

{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=desret}{td}{sub-section:rowIndex_des|trigger=button|text=}{sub-section}{sub-section:rowIndex_des|trigger=none|*Returns*\\{div:class=sIndent}Replace with description{sub-section[Number]{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{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}{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}{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}{tr:id=name}{td}h6.addColumn{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}addColumn{span}{span}\(name){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}{sub-section:rowIndex_link|trigger=none}{sub-section}\{[String]} name -- column name.
{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:rowIndex_sam|trigger=button|text=}{sub-section}div:class=sIndent}[Boolean] -- true if succeeded, else false.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:rowIndex_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
//tovar setsuccess 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-sectiondataset.addColumn('columnName',1);
{code}{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:tbody:id=addColumn-String_Number}{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=desprs}{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*Parameters*\\{div:class=sIndent}\{[String]} name -- column name.
\{[Number]} index -- column index number between 1 and getMaxColumnIndex().
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:addColumn-String_snc|trigger=button|text=}{sub-section}{sub-section:addColumn-String_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}[Boolean] -- true if succeeded, else false.{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:addColumn-String_prs|trigger=button|text=}{sub-section}{sub-section:addColumn-String_prs|trigger=none|class=sIndent}\{[String]} name -- column name.
{sub-sectiondiv:class=sIndent}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{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}{tr}{tbody}{tbody:id=addColumn-String_Number_Number}{tr:id=name}{td}h6.addColumn{td}{tr}{builder-showtr:permission=edit}{tr:id=seeid=sig}{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{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}addColumn{span}{span}\(name, index, type){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:addColumn-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addColumn-String_link|trigger=none}{sub-section}{\{[String]} name -- column name.
\{[Number]} index -- column index number between 1 and getMaxColumnIndex().
\{[Number]} type -- the type of column, see JSColumn constants.
{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:addColumn-String_sam|trigger=button|text=}{sub-section}div:class=sIndent}[Boolean] -- true if succeeded, else false.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{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=addColumnaddHTMLProperty-StringNumber_Number|class=node_String_String}{tr:id=name}{td}h6.addColumnaddHTMLProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]void{span}{span:id=iets|style=float: left; font-weight: bold;}addColumnaddHTMLProperty{span}{span:id=iets|style=float: left;}\(row, col, name, indexvalue){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{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*Parameters*\\{div:class=sIndent}\{[Number]} row -- row number
\{[Number]} col -- column number
\{[String]} name -- String property name
\{[String]} value -- String property value
{div}{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:addColumn-String_Number_snc|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_snc|trigger=none|div:class=sIndent} Replace with version info{sub-sectionvoid{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{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}{divdiv:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{builder-showtbody:permission=editid=addRow-Number_ObjectArray}{tr:id=linkname}{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}{divh6.addRow{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}addRow{span}{span}\(index, array){span}{td}{tr}{builder-show}{tr:id=samprs}{td}*SampleParameters*\\{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}\{[Number]} index -- index to add row (1\-based)
\{[Object]\[]} array -- row data
{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=addColumn-String_Number_Number|class=node}{tr:id=name}{td}h6.addColumn*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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){spanclass=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{builder-showtbody:permissionid=editaddRow-ObjectArray}{tr:id=desname}{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=edith6.addRow{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}addRow{span}{span}\(array){span}{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\{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-sectiondiv:class=sIndent}\{[Object]\[]} array -- row data
{div}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:addColumn-String_Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:addColumn-String_Number_Number_prs|trigger=none|div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div: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{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}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{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}{tr}{tbody}{tbody:id=createDataSource-String}{tr:id=name}{td}h6.createDataSource{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}createDataSource{span}{span}\(name){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{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}\{[String]} name -- data source name
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{trtr:id=linkret}{td}*External linksReturns*\\{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}{[String] -- String uri reference to the created data source.{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}
ds.addColumn('my_id'); //assuming the variable dataset contains a dataset
var success = dataset note: use regular javascript identifiers so they can be used in scripting
ds.addColumn('columnNamemy_label',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){spanvar 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}{div}{td}{tr}{builder-showtr:permission=editclass=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=createDataSource-String_Object}{tr:id=desname}{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=edith6.createDataSource{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}createDataSource{span}{span}\(name, types){span}{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\{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-sectiondiv:class=sIndent}\{[String]} name -- data source name
\{[Object]} types -- array of types as defined in JSColumn
{div}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:addHTMLProperty-Number_Number_String_String_prs|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_prs|trigger=none|div:class=sIndent}\{[NumberString]} row -- rowString number
\{[Number]} col -- column number
\{[String]} name -- String property name
\{[String]} value -- String property value
{sub-section}{uri reference to the created data source.{div}{td}{tr}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:addHTMLProperty-Number_Number_String_String_ret|trigger=button|text=}{sub-section}{sub-section:addHTMLProperty-Number_Number_String_String_ret|trigger=none|div: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{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{builder-showtbody:permissionid=editgetAsHTML}{tr:id=linkname}{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}{divh6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsHTML{span}{span}\(){span}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:addHTMLProperty-Number_Number_String_String_sam|trigger=button|text=}{sub-section}div:class=sIndent}[String] -- String html.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:addHTMLProperty-Number_Number_String_String_sam|trigger=none}{code:language=javascript}
//addsgets a containerdataset propertybased (toon TABLEa 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');

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 {code}{sub-sectiondisplay an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addRow-Number_ObjectArray|class=nodegetAsHTML-Boolean}{tr:id=name}{td}h6.addRowgetAsHTML{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void[String]{span}{span:id=iets|style=float: left; font-weight: bold;}addRowgetAsHTML{span}{span:id=iets|style=float: left;}\(index, arrayescape_values){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{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*Parameters*\\{div:class=sIndent}\{[Boolean]} escape_values -- if true, replaces illegal HTML characters with corresponding valid escape sequences.
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{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-sectiondiv:class=sIndent}[String] -- String html.{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{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:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsHTML{span}{span}\(escape_values, escape_spaces){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div: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.
{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=addRow-ObjectArray|class=node}{tr:id=name}{td}h6.addRow*Returns*\\{div:class=sIndent}[String] -- String html.{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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-sectionclass=sIndent}{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}{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=seetd}{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}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=linksig}{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{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsHTML{span}{span}\(escape_values, escape_spaces, multi_line_markup){span}{td}{tr}{builder-show}{tr:id=samprs}{td}*SampleParameters*\\{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}\{[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>
{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=createDataSource-String|class=node}{tr:id=name}{td}h6.createDataSource*Returns*\\{div:class=sIndent}[String] -- String html.{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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-sectionclass=sIndent}{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}{div}{td}{tr}{builder-show}{tr:id=prsclass=lastDetailRow}{td}{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{tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean_Boolean}{tr:id=name}{td}h6.getAsHTML{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsHTML{span}{span}\(escape_values, escape_spaces, multi_line_markup, pretty_indent){span}{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:createDataSource-String_ret|trigger=button|text=}{sub-section}{sub-section:createDataSource-String_ret|trigger=none|div:class=sIndent}\{[StringBoolean]} escape_values -- 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}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.
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:createDataSource-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:createDataSource-String_link|trigger=none}{sub-section}[String] -- String html.{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');
//gets note:a usedataset regularbased javascripton identifiersa soquery
they//useful canto belimit usedthe innumber scripting
ds.addColumn('my_label');of rows
var urimaxReturnedRows = ds.createDataSource('mydata', [JSColumn.INTEGER, JSColumn.TEXT])10;
var jsformquery = 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'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}{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=destd}{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}tr}{tbody}{tbody:id=getAsHTML-Boolean_Boolean_Boolean_Boolean_Boolean}{tr:id=name}{td}h6.getAsHTML{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsig}{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{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsHTML{span}{span}\(escape_values, escape_spaces, multi_line_markup, pretty_indent, add_column_names){span}{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|div:class=sIndent}\{[StringBoolean]} nameescape_values -- data source name if true, replaces illegal HTML characters with corresponding valid escape sequences.
\{[ObjectBoolean]} typesescape_spaces -- 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-showif 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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- String html.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getAsText-String_String_String_Boolean}{tr:id=name}{td}h6.getAsText{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getAsText{span}{span}\(column_separator, row_separator, value_delimiter, add_column_names){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:getValue-Number_Number_prs|trigger=button|text=}{sub-section}{sub-section:getValue-Number_Number_prs|trigger=none|div:class=sIndent}\{[NumberString]} rowcolumn_separator -- row number, 1\-based any specified column separator; examples: tab '\t'; comma ','; semicolon ';'; space ' ' .
\{[NumberString]} colrow_separator -- 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}{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.
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:getValue-Number_Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getValue-Number_Number_link|trigger=none}{sub-section}}[String] -- String formatted text.{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
//you can create csv or tab delimited results
var dataAtRow2Col1csv = dataset.getValue(2, 1);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=hadMoreData|class=nodegetColumnAsArray-Number}{tr:id=name}{td}h6.hadMoreDatagetColumnAsArray{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanObject]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}hadMoreDatagetColumnAsArray{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-showtr:permissionid=editprs}{tr:id=destd}*Parameters*\\{div:class=sIndent}\{[Number]} index -- index of column (1\-based).
{div}{td}{sub-section:hadMoreData_des|trigger=button|text=}{sub-section}{sub-section:hadMoreData_des|trigger=none|class=sIndent}Replace with description{sub-sectiontr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]\[] -- Object array of data.{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{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}div:class=sIndent}{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getColumnName-Number}{tr:id=name}{td}h6.getColumnName{td}{tr}{builder-show}{tr:id=retsig}{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{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getColumnName{span}{span}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:hadMoreData_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hadMoreData_see|trigger=none}{sub-section}\{[Number]} index -- index of column (1\-based).
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:hadMoreData_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hadMoreData_link|trigger=none}{sub-section}[String] -- String column name.{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 resultcode: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=removeColumngetColumnType-Number|class=node}{tr:id=name}{td}h6.removeColumngetColumnType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}removeColumn{span}{span:id=iets|style=float: left;font-weight: bold;}getColumnType{span}{span}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{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*Since*\\{div:class=sIndent}6.1.4{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncprs}{td}*SinceParameters*\\\{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{div:class=sIndent}\{[Number]} index -- index of column (1\-based).
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number] -- Number the column type (JSColumn constant){div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{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-sectiondiv:class=sIndent}{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}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{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}{tr}{tbody}{tbody:id=getException}{tr:id=name}{td}h6.getException{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{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{span:style=margin-right: 5px;}[ServoyException]{span}{span:style=font-weight: bold;}getException{span}{span}\(){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:removeColumn-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeColumn-Number_link|trigger=none}{sub-section}[ServoyException] -- ServoyException exception or null when not available.{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeColumn-Number_sam|trigger=button|text=}{sub-section}td}*Sample*\\{div:class=sIndent}{sub-section:removeColumn-Number_sam|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var successdbException = dataset.removeColumngetException(1);
// removes first column
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeRow-Number|class=nodegetMaxColumnIndex}{tr:id=name}{td}h6.removeRowgetMaxColumnIndex{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[Number]{span}{span:style=font-weight: bold;}getMaxColumnIndex{span}{span}\(){span}{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:removeRow-Number_snc|trigger=button|text=}{sub-section}{sub-section:removeRow-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}[Number] -- int number of columns.{div}{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|sam}{td}*Sample*\\{div: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{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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{builder-showtbody:permissionid=editgetMaxRowIndex}{tr:id=see}name}{td}h6.getMaxRowIndex{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}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getMaxRowIndex{span}{span}\(){span}{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:removeRow-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:removeRow-Number_link|trigger=none}{sub-section}[Number] -- int number of rows.{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 rowvar totalRows = dataset.removeRowgetMaxRowIndex(-1);
//removes all rows
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setColumnNamegetRowAsArray-Number_String|class=node}{tr:id=name}{td}h6.setColumnNamegetRowAsArray{td}{tr}{tr:id=sig}{td}{span:style=float: left; style=margin-right: 5px;}void[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}setColumnNamegetRowAsArray{span}{span:id=iets|style=float: left;}\(index, columnName){span}{td}{tr}{builder-showtr:permission=edit}{tr:id=desid=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} index -- index of row (1\-based).
{div}{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-sectiontr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]\[] -- Object array of data.{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{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-sectiondiv:class=sIndent}{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}{div}{td}{tr}{builder-show}{tr:id=prsclass=lastDetailRow}{td}{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}{tr}{tbody}{tbody:id=getValue-Number_Number}{tr:id=name}{td}h6.getValue{td}{tr}{tr:id=retsig}{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{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getValue{span}{span}\(row, col){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:setColumnName-Number_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setColumnName-Number_String_see|trigger=none}{sub-section}\{[Number]} row -- row number, 1\-based
\{[Number]} col -- column number, 1\-based
{div}{td}{tr}{builder-show}{builder-show:permission=edittr}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:setColumnName-Number_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setColumnName-Number_String_link|trigger=none}{sub-section}{[Object] -- Object value{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}
//assuming the variable dataset contains a dataset
var dataAtRow2Col1 = dataset.getValue(2, 1);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td{td}{td}{tr}{tbody}{tbody:id=hadMoreData}{tr:id=name}{td}h6.hadMoreData{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}hadMoreData{span}{span}\(){span}{td}{tr}{tbody}{tbodytr:id=setValue-Number_Number_Object|class=node}{tr:id=name}{td}h6.setValueret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- boolean more data available{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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){spanclass=sIndent}{code:language=javascript}
var ds = databaseManager.getDataSetByQuery('example_data', 'select order_id from orders', null, 10000)
if (ds.hadMoreData())
{
	// handle large result
}
{code}{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=destd}{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}tr}{tbody}{tbody:id=removeColumn-Number}{tr:id=name}{td}h6.removeColumn{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsig}{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{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeColumn{span}{span}\(index){span}{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|div:class=sIndent}\{[Number]} rowindex -- 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} index of column to remove (1\-based)
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if succeeded, else false.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.removeColumn(1); // removes first column
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeRow-Number}{tr:id=name}{td}h6.removeRow{td}{tr}{tr:id=retsig}{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{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}removeRow{span}{span}\(row){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{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}\{[Number]} row -- row index to remove, \-1 for all rows
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{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}void{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=sIndent}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.getValue(2, 1,'data');
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=sortsetColumnName-Number_Boolean|class=nodeString}{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=editsetColumnName{td}{tr}{tr:id=dessig}{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=editspan:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setColumnName{span}{span}\(index, columnName){span}{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\{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-sectiondiv:class=sIndent}\{[Number]} index -- index of column (1\-based).
\{[String]} columnName -- new column name.
{div}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:sort-Number_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_prs|trigger=none|div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}\{[Number]} col -- column number, 1\-based
\{[Boolean]} sort_direction -- ascending (true) or descending (false)
{sub-section{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}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:sort{tr}{tbody}{tbody:id=setValue-Number_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:sort-Number_Boolean_ret|trigger=none|class=sIndent}void{sub-sectionNumber_Object}{tr:id=name}{td}h6.setValue{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setValue{span}{span}\(row, col, obj){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{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: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.
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:sort-Number_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Number_Boolean_link|trigger=none}{sub-section}{void{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.sortgetValue(2, 1, false'data');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort-Function|class=nodeNumber_Boolean}{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;}\(comparatorcol, sort_direction){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{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*Parameters*\\{div:class=sIndent}\{[Number]} col -- column number, 1\-based
\{[Boolean]} sort_direction -- ascending (true) or descending (false)
{div}{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:sort-Function_snc|trigger=button|text=}{sub-section}{sub-section:sort-Function_snc|trigger=none|div:class=sIndent} Replace with version info{sub-sectionvoid{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:sort-Function_prs|trigger=button|text=}{sub-section}{sub-section:sort-Function_prs|trigger=none|class=sIndent}\{[Function]} comparator -- comparator function
{sub-sectiondiv:class=sIndent}{code:language=javascript}
// sort using column number
//assuming the variable dataset contains a dataset
dataset.sort(1, false)
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:sort-Function_ret|trigger=button|text=}{sub-section}{sub-section:sort-Function_ret|trigger=none|class=sIndent}void{sub-section}{tr}{tbody}{tbody:id=sort-Function}{tr:id=name}{td}h6.sort{td}{tr}{builder-showtr:permission=editid=sig}{td}{trspan:id=see}{td}*Also see*\\{sub-section:sort-Function_see|trigger=button|text=}{sub-section}style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}sort{span}{span}\(comparator){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}{sub-section:sort-Function_see|trigger=none}{sub-section}\{[Function]} comparator -- comparator function
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:sort-Function_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sort-Function_link|trigger=none}{sub-section}void{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}