Versions Compared

Key

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

{table:class=servoy sSummery}{colgroup}{column:width=80px}{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:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{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}[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]\(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}[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}[#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 in ascending or descending.{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720}{tr:id=name}{td}h6.rowIndex{td}{tr}{tr:id=des}{td}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_des|text=|trigger=button}{sub-section}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_des|trigger=none|class=sIndent}Get or set the record index of the dataset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_ret|text=|trigger=button}{sub-section}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_see|text=|trigger=button}{sub-section}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_see|text=|trigger=button}{sub-section}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_sam|text=|trigger=button}{sub-section}{sub-section:6784185F628893F7-52CA180E-4CCE48FB-8B1BAA04-98265693A6AA1F085C92E720_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
//to set the rowIndex:
dataset.rowIndex = 1 //sets the rowIndex to the first row (dataset is 1-based)
//to retrieve the rowIndex of the currently selected row
var currRow = dataset.rowIndex
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1}{tr:id=name}{td}h6.addColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addColumn{span}{span:id=iets|style=float: left;}\(name, index, type){span}{td}{tr}{tr:id=des}{td}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_des|text=|trigger=button}{sub-section}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_des|trigger=none|class=sIndent}adds a column with the specified name to the dataset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_prs|trigger=none}name -- column name.
\[index\] -- column index number between 1 and getMaxColumnIndex().
\[type\] -- the type of column, see JSColumn constants.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_ret|text=|trigger=button}{sub-section}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_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:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_see|text=|trigger=button}{sub-section}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_see|text=|trigger=button}{sub-section}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_sam|text=|trigger=button}{sub-section}{sub-section:C04F5B15B416B35F-E2EB0F58-4C104066-A08E949B-0D85155BE415EF92BF74AAE1_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.addColumn('columnName',1);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C}{tr:id=name}{td}h6.addHTMLProperty{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addHTMLProperty{span}{span:id=iets|style=float: left;}\(row, col, name, value){span}{td}{tr}{tr:id=des}{td}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_des|text=|trigger=button}{sub-section}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_des|trigger=none|class=sIndent}Add an HTML property to an HTML tag produced in getAsHTML().

For row and col parameters use:
1 = applies to the container
0 = applies to all
>0 = applies to specific cell{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_prs|trigger=none}row -- row number
col -- column number
name -- String property name
value -- String property value
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_ret|text=|trigger=button}{sub-section}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_see|text=|trigger=button}{sub-section}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_see|text=|trigger=button}{sub-section}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_sam|text=|trigger=button}{sub-section}{sub-section:623AA62A00351B4C-A8E5F54A-42DD45E5-910D934A-FEC24C7FB2B6DA9BEB31E61C_sam|class=sIndent|trigger=none}{code:language=javascript}
//adds a container property (to TABLE tag)
dataset.addHTMLProperty(-1,-1,'cellspacing','3');

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

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

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

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

globals.html_field = '<html>'+dataset.getAsHTML()+'</html>';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413}{tr:id=name}{td}h6.addRow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addRow{span}{span:id=iets|style=float: left;}\(index, array){span}{td}{tr}{tr:id=des}{td}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_des|text=|trigger=button}{sub-section}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_des|trigger=none|class=sIndent}Add a row to the dataset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_prs|trigger=none}\[index\] -- index to add row (1-based), add by default as last row
array -- row data
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_ret|text=|trigger=button}{sub-section}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_see|text=|trigger=button}{sub-section}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_see|text=|trigger=button}{sub-section}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_sam|text=|trigger=button}{sub-section}{sub-section:3A36F4D990735BF7-6886A87F-4B27442B-8CCA9BC1-BB41A2E3EE8DDCE90A460413_sam|class=sIndent|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 after row 2
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363}{tr:id=name}{td}h6.createDataSource{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createDataSource{span}{span:id=iets|style=float: left;}\(name, types){span}{td}{tr}{tr:id=des}{td}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_des|text=|trigger=button}{sub-section}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_des|trigger=none|class=sIndent}Create a data source from the data set with specified name and using specified types.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_prs|trigger=none}name -- data source name
\[types\] -- array of types as defined in JSColumn, when null or not supplied types are inferred from the data if possible.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_ret|text=|trigger=button}{sub-section}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_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:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_see|text=|trigger=button}{sub-section}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_see|text=|trigger=button}{sub-section}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_sam|text=|trigger=button}{sub-section}{sub-section:F0C4BABE6CDD89A0-AC8A92E8-4EB64DE8-B647B106-AA4F2C17559626D7E7680363_sam|class=sIndent|trigger=none}{code:language=javascript}
ds.addColumn('my_id');
	ds.addColumn('my_label');
	var uri = ds.createDataSource('mydata', [JSColumn.INTEGER, JSColumn.TEXT]);
	var jsform = solutionModel.newForm(fname, uri, null, true, 300, 300);

 var query = 'select customerid, address, city, country  from customers';
 var ds2 = databaseManager.getDataSetByQuery('example_data', query, null, 999);
 var uri2 = ds2.createDataSource('mydata2'); // types are inferred from query result
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871}{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}{tr:id=des}{td}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_des|text=|trigger=button}{sub-section}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_des|trigger=none|class=sIndent}Get the dataset as an html table.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_prs|trigger=none}\[escape_values\] -- if true, replaces illegal HTML characters with corresponding valid escape sequences.
\[escape_spaces\] -- if true, replaces text spaces with non-breaking space tags ( ) and tabs by four non-breaking space tags.
\[multi_line_markup\] -- if true, multiLineMarkup will enforce new lines that are in the text; single new lines will be replaced by <br>, multiple new lines will be replaced by <p>
\[pretty_indent\] -- if true, adds indentation for more readable HTML code.
\[add_column_names\] -- if false, column headers will not be added to the table.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_ret|text=|trigger=button}{sub-section}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_ret|trigger=none|class=sIndent}[String] -- String html.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_see|text=|trigger=button}{sub-section}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_see|text=|trigger=button}{sub-section}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_sam|text=|trigger=button}{sub-section}{sub-section:121AD3D24BA8A42F-E2D332CC-4A524913-BA3183E1-791B9FC1B66A5F70EDB02871_sam|class=sIndent|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.getServerNamegetDataSource()),query,args,maxReturnedRows);

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

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

//Note: To display an HTML_AREA field as an HTML page, add HTML tags at the beginning '<html>' and at the end '</html>'.
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F}{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}{tr:id=des}{td}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_des|text=|trigger=button}{sub-section}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_des|trigger=none|class=sIndent}Get the dataset as formatted text.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_prs|trigger=none}column_separator -- any specified column separator; examples: tab '\t'; comma ','; semicolon ';'; space ' ' .
row_separator -- the specified row separator; examples: new line '\n'.
value_delimiter -- the specified value delimiter; example: double quote '"'.
add_column_names -- boolean if true column names will be added as a first row.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_ret|text=|trigger=button}{sub-section}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_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:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_see|text=|trigger=button}{sub-section}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_see|text=|trigger=button}{sub-section}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_sam|text=|trigger=button}{sub-section}{sub-section:27781F188E56F956-B2FE6634-444E48FC-BD0FB76E-266BE0297637EF4CB5A24F1F_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E}{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}{tr:id=des}{td}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_des|text=|trigger=button}{sub-section}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_des|trigger=none|class=sIndent}Get the column data of a dataset as an Array.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_prs|trigger=none}index -- index of column (1-based).
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_ret|text=|trigger=button}{sub-section}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_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:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_see|text=|trigger=button}{sub-section}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_see|text=|trigger=button}{sub-section}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_sam|text=|trigger=button}{sub-section}{sub-section:0C4E21C08D653859-332DE9E1-4FBB492B-A954A19C-CEBC3C7928F2FCD7D3A83F0E_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1}{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}{tr:id=des}{td}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_des|text=|trigger=button}{sub-section}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_des|trigger=none|class=sIndent}Get a column name based on index.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_prs|trigger=none}index -- index of column (1-based).
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_ret|text=|trigger=button}{sub-section}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_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:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_see|text=|trigger=button}{sub-section}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_see|text=|trigger=button}{sub-section}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_sam|text=|trigger=button}{sub-section}{sub-section:33D3F59E07587F0F-83F94DDD-4F954196-82E489B9-37B1CA946621FC8D6FA584F1_sam|class=sIndent|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.getServerNamegetDataSource()), 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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18}{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}{tr:id=des}{td}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_des|text=|trigger=button}{sub-section}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_des|trigger=none|class=sIndent}Get the database exception if an error occurred.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_ret|text=|trigger=button}{sub-section}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_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:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_see|text=|trigger=button}{sub-section}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_see|text=|trigger=button}{sub-section}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_sam|text=|trigger=button}{sub-section}{sub-section:7A341BA6C366A369-5FAB8211-4268459C-A0B39B9C-4C3794A1419A4FC111E16A18_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var dbException = dataset.getException();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A}{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}{tr:id=des}{td}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_des|text=|trigger=button}{sub-section}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_des|trigger=none|class=sIndent}Get the number of columns in the dataset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_ret|text=|trigger=button}{sub-section}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_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:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_see|text=|trigger=button}{sub-section}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_see|text=|trigger=button}{sub-section}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_sam|text=|trigger=button}{sub-section}{sub-section:AE190305CA20006C-E9B74919-4E21445A-80979D19-8709A8A2329485A06D95AC3A_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D}{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}{tr:id=des}{td}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_des|text=|trigger=button}{sub-section}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_des|trigger=none|class=sIndent}Get the number of rows in the dataset.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_ret|text=|trigger=button}{sub-section}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_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:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_see|text=|trigger=button}{sub-section}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_see|text=|trigger=button}{sub-section}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_sam|text=|trigger=button}{sub-section}{sub-section:2EA74B4E18A84E7F-B66DFACB-485D4AE3-8F89A5CF-4A5B97EF2DC0D8F09280CD2D_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var totalRows = dataset.getMaxRowIndex();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F}{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}{tr:id=des}{td}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_des|text=|trigger=button}{sub-section}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_des|trigger=none|class=sIndent}Get the row data of a dataset as an Array.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_prs|trigger=none}index -- index of row (1-based).
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_ret|text=|trigger=button}{sub-section}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_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:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_see|text=|trigger=button}{sub-section}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_see|text=|trigger=button}{sub-section}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_sam|text=|trigger=button}{sub-section}{sub-section:631ADF57DD034344-80307D33-446941CB-88AE946F-63DCB74F88285D6EE32AEB9F_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677}{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}{tr:id=des}{td}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_des|text=|trigger=button}{sub-section}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_des|trigger=none|class=sIndent}Get the value specified by row and column position from the dataset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_prs|trigger=none}row -- row number, 1-based
col -- column number, 1-based
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_ret|text=|trigger=button}{sub-section}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_ret|trigger=none|class=sIndent}Object -- Object value{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_see|text=|trigger=button}{sub-section}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_see|text=|trigger=button}{sub-section}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_sam|text=|trigger=button}{sub-section}{sub-section:8DD1A6155D671A63-076E1601-40354761-9890A755-E6D6B7C58A21578CD4DC7677_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var dataAtRow2Col1 = dataset.getValue(2, 1);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3}{tr:id=name}{td}h6.hadMoreData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hadMoreData{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_des|text=|trigger=button}{sub-section}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_des|trigger=none|class=sIndent}Return true if there is more data in the resultset then specified by maxReturnedRows at query time.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_ret|text=|trigger=button}{sub-section}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_ret|trigger=none|class=sIndent}[Boolean] -- boolean more data available{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_see|text=|trigger=button}{sub-section}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_see|text=|trigger=button}{sub-section}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_sam|text=|trigger=button}{sub-section}{sub-section:7A88A15A80105B2A-C9882895-45494ADA-B401A981-A68C7BA3DB73D90D9E6CDED3_sam|class=sIndent|trigger=none}{code:language=javascript}
var ds = databaseManager.getDataSetByQuery('example_data', 'select order_id from orders', null, 10000)
if (ds.hadMoreData())
{
	// handle large result
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D}{tr:id=name}{td}h6.removeColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeColumn{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_des|text=|trigger=button}{sub-section}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_des|trigger=none|class=sIndent}Remove a column by index from the dataset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_prs|trigger=none}index -- index of column to remove (1-based)
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_ret|text=|trigger=button}{sub-section}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_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:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_see|text=|trigger=button}{sub-section}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_see|text=|trigger=button}{sub-section}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_sam|text=|trigger=button}{sub-section}{sub-section:3680B4B69EA0D96C-E51B9689-464948D0-A599B9B4-C4BE10336366ECF14CD2C20D_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
var success = dataset.removeColumn(1); // removes first column
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E}{tr:id=name}{td}h6.removeRow{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeRow{span}{span:id=iets|style=float: left;}\(row){span}{td}{tr}{tr:id=des}{td}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_des|text=|trigger=button}{sub-section}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_des|trigger=none|class=sIndent}Remove a row from the dataset.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_prs|trigger=none}row -- row index to remove, -1 for all rows
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_ret|text=|trigger=button}{sub-section}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_see|text=|trigger=button}{sub-section}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_see|text=|trigger=button}{sub-section}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_sam|text=|trigger=button}{sub-section}{sub-section:554DE30B67BC9B86-064E70BA-4DCC4E72-9CE28906-77BD9696E968F97844D76B0E_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.removeRow(1); //removes the first row
dataset.removeRow(-1); //removes all rows
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA}{tr:id=name}{td}h6.setValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setValue{span}{span:id=iets|style=float: left;}\(row, col, obj){span}{td}{tr}{tr:id=des}{td}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_des|text=|trigger=button}{sub-section}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_des|trigger=none|class=sIndent}Set the value specified by row and column position from the dataset.
Use row = -1, to set columnnames.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_prs|trigger=none}row -- row number, 1-based
col -- column number, 1-based
obj -- the value to be stored at the given row and column.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_ret|text=|trigger=button}{sub-section}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_see|text=|trigger=button}{sub-section}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_see|text=|trigger=button}{sub-section}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_sam|text=|trigger=button}{sub-section}{sub-section:3059179A854B68FB-0EB858BC-4240489D-A18CADDF-A958BEBE7D92C0238977DAFA_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.getValue(2, 1,'data');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8}{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}{tr:id=des}{td}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_des|text=|trigger=button}{sub-section}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_des|trigger=none|class=sIndent}Sort the dataset on the given column in ascending or descending.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_prs|trigger=none}col -- column number, 1-based
sort_direction -- boolean true for ascending, false for descending
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_ret|text=|trigger=button}{sub-section}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_see|text=|trigger=button}{sub-section}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_see|text=|trigger=button}{sub-section}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_sam|text=|trigger=button}{sub-section}{sub-section:12D95F663D100D5A-A10EBA31-4C4145CB-ADAFB4E6-A36F931172DC9547F3FD97B8_sam|class=sIndent|trigger=none}{code:language=javascript}
//assuming the variable dataset contains a dataset
dataset.sort(1,false)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}