Child pages
  • JSValueList

Versions Compared

Key

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

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#CUSTOM_VALUES]
Constant to set the valueListType of a JSValueList.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#DATABASE_VALUES]
Constant to set the valueListType of a JSValueList.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#EMPTY_VALUE_ALWAYS]
Constant to set/get the addEmptyValue property of a JSValueList.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#EMPTY_VALUE_NEVER]
Constant to set/get the addEmptyValue property of a JSValueList.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#addEmptyValue]
Property that tells if an empty value must be shown next to the items in the value list.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#customValues]
A string with the elements in the valuelist.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#dataSource]
Compact representation of the names of the server and table that 
are used for loading the data from the database.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#globalMethod]
A global method that provides the data for the valuelist.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the value list.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#relationName]
The name of the relation that is used for loading data from the database.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#separator]
A String representing the separator that should be used when multiple
display dataproviders are set, when the value list has the type set to
database values.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#serverName]
The name of the database server that is used for loading the values when 
the value list has the type set to database values.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#sortOptions]
Sort options that are applied when the valuelist loads its data
from the database.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#tableName]
The name of the database table that is used for loading the values when 
the value list has the type set to database values.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#useTableFilter]
Flag that tells if the name of the valuelist should be applied as a filter on the
'valuelist\_name' column when retrieving the data from the database.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#valueListType]
The type of the valuelist.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Object]\[]{td}{td}[#getDisplayDataProviderIds]\()
Returns an array of the dataproviders that will be used to display the valuelist value.{td}{tr}{tbody}{tbody}{tr}{td}[Object]\[]{td}{td}[#getReturnDataProviderIds]\()
Returns an array of the dataproviders that will be used to define the valuelist value that is saved.{td}{tr}{tbody}{tbody}{tr}{td}[UUID]{td}{td}[#getUUID]\()
Returns the UUID of the value list{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDisplayDataProviderIds]\(dataprovider1, \[dataprovider2\], \[dataprovider3\])
Set the display dataproviders.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setReturnDataProviderIds]\(dataprovider1, \[dataprovider2\], \[dataprovider3\])
Set the return dataprovers.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=CUSTOM_VALUES|class=node}{tr:id=name}{td}h6.CUSTOM_VALUES{td}{tr}{tr:id=des}{td}{sub-section:CUSTOM_VALUES_des|text=|trigger=button}{sub-section}{sub-section:CUSTOM_VALUES_des|trigger=none|class=sIndent}Constant to set the valueListType of a JSValueList.
Sets the value list to use a custom list of values.
Also used in solutionModel.newValueList(...) to create new valuelists{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:CUSTOM_VALUES_snc|text=|trigger=button}{sub-section}{sub-section:CUSTOM_VALUES_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:CUSTOM_VALUES_prs|text=|trigger=button}{sub-section}{sub-section:CUSTOM_VALUES_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CUSTOM_VALUES_ret|text=|trigger=button}{sub-section}{sub-section:CUSTOM_VALUES_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CUSTOM_VALUES_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CUSTOM_VALUES_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CUSTOM_VALUES_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CUSTOM_VALUES_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CUSTOM_VALUES_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CUSTOM_VALUES_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.valueListType = JSValueList.CUSTOM_VALUES; // Change the type to custom values.
vlist.customValues = "one\ntwo\nthree\nfour";
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DATABASE_VALUES|class=node}{tr:id=name}{td}h6.DATABASE_VALUES{td}{tr}{tr:id=des}{td}{sub-section:DATABASE_VALUES_des|text=|trigger=button}{sub-section}{sub-section:DATABASE_VALUES_des|trigger=none|class=sIndent}Constant to set the valueListType of a JSValueList.
Sets the value list to use values loaded from a database.
Also used in solutionModel.newValueList(...) to create new valuelists{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:DATABASE_VALUES_snc|text=|trigger=button}{sub-section}{sub-section:DATABASE_VALUES_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:DATABASE_VALUES_prs|text=|trigger=button}{sub-section}{sub-section:DATABASE_VALUES_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DATABASE_VALUES_ret|text=|trigger=button}{sub-section}{sub-section:DATABASE_VALUES_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DATABASE_VALUES_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DATABASE_VALUES_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DATABASE_VALUES_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DATABASE_VALUES_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DATABASE_VALUES_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DATABASE_VALUES_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EMPTY_VALUE_ALWAYS|class=node}{tr:id=name}{td}h6.EMPTY_VALUE_ALWAYS{td}{tr}{tr:id=des}{td}{sub-section:EMPTY_VALUE_ALWAYS_des|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_ALWAYS_des|trigger=none|class=sIndent}Constant to set/get the addEmptyValue property of a JSValueList.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:EMPTY_VALUE_ALWAYS_snc|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_ALWAYS_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:EMPTY_VALUE_ALWAYS_prs|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_ALWAYS_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EMPTY_VALUE_ALWAYS_ret|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_ALWAYS_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EMPTY_VALUE_ALWAYS_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_ALWAYS_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EMPTY_VALUE_ALWAYS_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_ALWAYS_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EMPTY_VALUE_ALWAYS_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_ALWAYS_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
vlist.addEmptyValue = JSValueList.EMPTY_VALUE_ALWAYS;
var cmb = form.newComboBox('my_table_text', 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EMPTY_VALUE_NEVER|class=node}{tr:id=name}{td}h6.EMPTY_VALUE_NEVER{td}{tr}{tr:id=des}{td}{sub-section:EMPTY_VALUE_NEVER_des|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_NEVER_des|trigger=none|class=sIndent}Constant to set/get the addEmptyValue property of a JSValueList.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:EMPTY_VALUE_NEVER_snc|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_NEVER_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:EMPTY_VALUE_NEVER_prs|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_NEVER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EMPTY_VALUE_NEVER_ret|text=|trigger=button}{sub-section}{sub-section:EMPTY_VALUE_NEVER_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EMPTY_VALUE_NEVER_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_NEVER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EMPTY_VALUE_NEVER_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_NEVER_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EMPTY_VALUE_NEVER_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EMPTY_VALUE_NEVER_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
vlist.addEmptyValue = JSValueList.EMPTY_VALUE_NEVER;
var cmb = form.newComboBox('my_table_text', 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=addEmptyValue|class=node}{tr:id=name}{td}h6.addEmptyValue{td}{tr}{tr:id=des}{td}{sub-section:addEmptyValue_des|text=|trigger=button}{sub-section}{sub-section:addEmptyValue_des|trigger=none|class=sIndent}Property that tells if an empty value must be shown next to the items in the value list.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addEmptyValue_snc|text=|trigger=button}{sub-section}{sub-section:addEmptyValue_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:addEmptyValue_prs|text=|trigger=button}{sub-section}{sub-section:addEmptyValue_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:addEmptyValue_ret|text=|trigger=button}{sub-section}{sub-section:addEmptyValue_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addEmptyValue_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addEmptyValue_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addEmptyValue_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addEmptyValue_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addEmptyValue_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addEmptyValue_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
vlist.addEmptyValue = JSValueList.EMPTY_VALUE_NEVER;
var cmb = form.newComboBox('my_table_text', 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=customValues|class=node}{tr:id=name}{td}h6.customValues{td}{tr}{tr:id=des}{td}{sub-section:customValues_des|text=|trigger=button}{sub-section}{sub-section:customValues_des|trigger=none|class=sIndent}A string with the elements in the valuelist. The elements 
can be separated by linefeeds (custom1
custom2), optional with realvalues ((custom1|1
custom2|2)).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:customValues_snc|text=|trigger=button}{sub-section}{sub-section:customValues_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:customValues_prs|text=|trigger=button}{sub-section}{sub-section:customValues_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:customValues_ret|text=|trigger=button}{sub-section}{sub-section:customValues_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:customValues_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:customValues_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:customValues_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:customValues_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:customValues_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:customValues_sam|trigger=none}{code:language=javascript}
var vl1 = solutionModel.newValueList("customtext",JSValueList.CUSTOM_VALUES);
vl1.customValues = "customvalue1\ncustomvalue2";
var vl2 = solutionModel.newValueList("customid",JSValueList.CUSTOM_VALUES);
vl2.customValues = "customvalue1|1\ncustomvalue2|2";
var form = solutionModel.newForm("customvaluelistform",controller.getDataSource(),null,true,300,300);
var combo1 = form.newComboBox("globals.text",10,10,120,20);
combo1.valuelist = vl1;
var combo2 = form.newComboBox("globals.id",10,60,120,20);
combo2.valuelist = vl2;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=dataSource|class=node}{tr:id=name}{td}h6.dataSource{td}{tr}{tr:id=des}{td}{sub-section:dataSource_des|text=|trigger=button}{sub-section}{sub-section:dataSource_des|trigger=none|class=sIndent}Compact representation of the names of the server and table that 
are used for loading the data from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:dataSource_snc|text=|trigger=button}{sub-section}{sub-section:dataSource_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:dataSource_prs|text=|trigger=button}{sub-section}{sub-section:dataSource_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:dataSource_ret|text=|trigger=button}{sub-section}{sub-section:dataSource_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:dataSource_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSource_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:dataSource_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:dataSource_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:dataSource_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=globalMethod|class=node}{tr:id=name}{td}h6.globalMethod{td}{tr}{tr:id=des}{td}{sub-section:globalMethod_des|text=|trigger=button}{sub-section}{sub-section:globalMethod_des|trigger=none|class=sIndent}A global method that provides the data for the valuelist. The global method must provided the data 
as a JSDataSet.

It is called when the valuelist needs data, it has 3 modes.
real and display params both null: return the whole list
only display is specified, called by a typeahead, return a filtered list
only real value is specified, called when the list doesnt contain the real value for the give record value, this will insert this value into the existing list.

In find mode the record with be the FindRecord which is just like a normal JSRecord (DataRecord) it has the same properties (column/dataproviders) but doesnt have its methods (like isEditing()){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:globalMethod_snc|text=|trigger=button}{sub-section}{sub-section:globalMethod_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:globalMethod_prs|text=|trigger=button}{sub-section}{sub-section:globalMethod_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:globalMethod_ret|text=|trigger=button}{sub-section}{sub-section:globalMethod_ret|trigger=none|class=sIndent}[JSMethod]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:globalMethod_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:globalMethod_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:globalMethod_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:globalMethod_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:globalMethod_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:globalMethod_sam|trigger=none}{code:language=javascript}
var listProvider = solutionModel.newGlobalMethod('function getDataSetForValueList(displayValue, realValue, record, valueListName, findMode) {' +
		'	' +
		'if (displayValue == null && realValue == null) {' +
		'  // TODO think about caching this result. can be called often!' +
		'  // return the complete list' +
		'  return databaseManager.getDataSetByQuery("example_data", "select firstname || ' ' || lastname, employeeid from employees", null, 100);' +
		'} else if (displayValue != null) {' +
		'  // TYPE_AHEAD filter call, return a filtered list' +
		'  var args = [displayValue + "%", displayValue + "%"]' +
		'  return databaseManager.getDataSetByQuery("example_data", "select firstname || ' ' || lastname, employeeid from employees where firstname like ? or lastname like ?", args, 100);' +
		'} else if (realValue != null) {' +
		'  // TODO think about caching this result. can be called often!' +
		'  // real object not found in the current list, return 1 row with display,realvalue that will be added to the current list' +
		'  // dont return a complete list in this mode because that will be added to the list that is already there' +
		'  args = [realValue];' +
		'  return databaseManager.getDataSetByQuery("example_data", "select firstname || ' ' || lastname, employeeid from employees where employeeid = ?", args, 1);' +
		'}' +
	'}');
var vlist = solutionModel.newValueList('vlist', JSValueList.CUSTOM_VALUES);
vlist.globalMethod = listProvider;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{sub-section:name_des|text=|trigger=button}{sub-section}{sub-section:name_des|trigger=none|class=sIndent}The name of the value list.

It is relevant when the "useTableFilter" property is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:name_snc|text=|trigger=button}{sub-section}{sub-section:name_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:name_prs|text=|trigger=button}{sub-section}{sub-section:name_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:name_ret|text=|trigger=button}{sub-section}{sub-section:name_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:name_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:name_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:name_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:name_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.serverName = 'example_data';
vlist.tableName = 'valuelists';
vlist.setDisplayDataProviderIds('valuelist_data');
vlist.setReturnDataProviderIds('valuelist_data');
vlist.useTableFilter = true;
vlist.name = 'two';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=relationName|class=node}{tr:id=name}{td}h6.relationName{td}{tr}{tr:id=des}{td}{sub-section:relationName_des|text=|trigger=button}{sub-section}{sub-section:relationName_des|trigger=none|class=sIndent}The name of the relation that is used for loading data from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:relationName_snc|text=|trigger=button}{sub-section}{sub-section:relationName_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:relationName_prs|text=|trigger=button}{sub-section}{sub-section:relationName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:relationName_ret|text=|trigger=button}{sub-section}{sub-section:relationName_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:relationName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relationName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:relationName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relationName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:relationName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:relationName_sam|trigger=none}{code:language=javascript}
var rel = solutionModel.newRelation('parent_to_child', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
rel.newRelationItem('parent_table_id', '=', 'child_table_parent_id');

var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.relationName = 'parent_to_child';
vlist.setDisplayDataProviderIds('child_table_text');
vlist.setReturnDataProviderIds('child_table_text');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=separator|class=node}{tr:id=name}{td}h6.separator{td}{tr}{tr:id=des}{td}{sub-section:separator_des|text=|trigger=button}{sub-section}{sub-section:separator_des|trigger=none|class=sIndent}A String representing the separator that should be used when multiple
display dataproviders are set, when the value list has the type set to
database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:separator_snc|text=|trigger=button}{sub-section}{sub-section:separator_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:separator_prs|text=|trigger=button}{sub-section}{sub-section:separator_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:separator_ret|text=|trigger=button}{sub-section}{sub-section:separator_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:separator_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:separator_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:separator_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:separator_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:separator_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:separator_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=serverName|class=node}{tr:id=name}{td}h6.serverName{td}{tr}{tr:id=des}{td}{sub-section:serverName_des|text=|trigger=button}{sub-section}{sub-section:serverName_des|trigger=none|class=sIndent}The name of the database server that is used for loading the values when 
the value list has the type set to database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:serverName_snc|text=|trigger=button}{sub-section}{sub-section:serverName_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:serverName_prs|text=|trigger=button}{sub-section}{sub-section:serverName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:serverName_ret|text=|trigger=button}{sub-section}{sub-section:serverName_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:serverName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:serverName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:serverName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:serverName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:serverName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:serverName_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sortOptions|class=node}{tr:id=name}{td}h6.sortOptions{td}{tr}{tr:id=des}{td}{sub-section:sortOptions_des|text=|trigger=button}{sub-section}{sub-section:sortOptions_des|trigger=none|class=sIndent}Sort options that are applied when the valuelist loads its data
from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sortOptions_snc|text=|trigger=button}{sub-section}{sub-section:sortOptions_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:sortOptions_prs|text=|trigger=button}{sub-section}{sub-section:sortOptions_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:sortOptions_ret|text=|trigger=button}{sub-section}{sub-section:sortOptions_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sortOptions_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortOptions_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sortOptions_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortOptions_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sortOptions_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:sortOptions_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=tableName|class=node}{tr:id=name}{td}h6.tableName{td}{tr}{tr:id=des}{td}{sub-section:tableName_des|text=|trigger=button}{sub-section}{sub-section:tableName_des|trigger=none|class=sIndent}The name of the database table that is used for loading the values when 
the value list has the type set to database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:tableName_snc|text=|trigger=button}{sub-section}{sub-section:tableName_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:tableName_prs|text=|trigger=button}{sub-section}{sub-section:tableName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:tableName_ret|text=|trigger=button}{sub-section}{sub-section:tableName_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:tableName_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:tableName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:tableName_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:tableName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:tableName_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:tableName_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=useTableFilter|class=node}{tr:id=name}{td}h6.useTableFilter{td}{tr}{tr:id=des}{td}{sub-section:useTableFilter_des|text=|trigger=button}{sub-section}{sub-section:useTableFilter_des|trigger=none|class=sIndent}Flag that tells if the name of the valuelist should be applied as a filter on the
'valuelist\_name' column when retrieving the data from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:useTableFilter_snc|text=|trigger=button}{sub-section}{sub-section:useTableFilter_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:useTableFilter_prs|text=|trigger=button}{sub-section}{sub-section:useTableFilter_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:useTableFilter_ret|text=|trigger=button}{sub-section}{sub-section:useTableFilter_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:useTableFilter_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:useTableFilter_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:useTableFilter_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:useTableFilter_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:useTableFilter_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:useTableFilter_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.serverName = 'example_data';
vlist.tableName = 'valuelists';
vlist.setDisplayDataProviderIds('valuelist_data');
vlist.setReturnDataProviderIds('valuelist_data');
vlist.useTableFilter = true;
vlist.name = 'two';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=valueListType|class=node}{tr:id=name}{td}h6.valueListType{td}{tr}{tr:id=des}{td}{sub-section:valueListType_des|text=|trigger=button}{sub-section}{sub-section:valueListType_des|trigger=none|class=sIndent}The type of the valuelist. Can be either custom values or database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:valueListType_snc|text=|trigger=button}{sub-section}{sub-section:valueListType_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:valueListType_prs|text=|trigger=button}{sub-section}{sub-section:valueListType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:valueListType_ret|text=|trigger=button}{sub-section}{sub-section:valueListType_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:valueListType_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:valueListType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:valueListType_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:valueListType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:valueListType_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:valueListType_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDisplayDataProviderIds|class=node}{tr:id=name}{td}h6.getDisplayDataProviderIds{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getDisplayDataProviderIds{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getDisplayDataProviderIds_des|text=|trigger=button}{sub-section}{sub-section:getDisplayDataProviderIds_des|trigger=none|class=sIndent}Returns an array of the dataproviders that will be used to display the valuelist value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDisplayDataProviderIds_snc|text=|trigger=button}{sub-section}{sub-section:getDisplayDataProviderIds_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:getDisplayDataProviderIds_prs|text=|trigger=button}{sub-section}{sub-section:getDisplayDataProviderIds_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDisplayDataProviderIds_ret|text=|trigger=button}{sub-section}{sub-section:getDisplayDataProviderIds_ret|trigger=none|class=sIndent}[Object]\[] -- An array of Strings representing the names of the display dataproviders.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDisplayDataProviderIds_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDisplayDataProviderIds_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDisplayDataProviderIds_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDisplayDataProviderIds_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDisplayDataProviderIds_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDisplayDataProviderIds_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text', 'parent_table_id');
vlist.setReturnDataProviderIds('parent_table_text');
var dispDP = vlist.getDisplayDataProviderIds();
for (var i=0; i<dispDP.length; i++)
	application.output(dispDP[i]);
var retDP = vlist.getReturnDataProviderIds();
for (var i=0; i<retDP.length; i++)
	application.output(retDP[i]);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getReturnDataProviderIds|class=node}{tr:id=name}{td}h6.getReturnDataProviderIds{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getReturnDataProviderIds{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getReturnDataProviderIds_des|text=|trigger=button}{sub-section}{sub-section:getReturnDataProviderIds_des|trigger=none|class=sIndent}Returns an array of the dataproviders that will be used to define the valuelist value that is saved.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getReturnDataProviderIds_snc|text=|trigger=button}{sub-section}{sub-section:getReturnDataProviderIds_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:getReturnDataProviderIds_prs|text=|trigger=button}{sub-section}{sub-section:getReturnDataProviderIds_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getReturnDataProviderIds_ret|text=|trigger=button}{sub-section}{sub-section:getReturnDataProviderIds_ret|trigger=none|class=sIndent}[Object]\[] -- An array of Strings representing the names of the return dataprovider.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getReturnDataProviderIds_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getReturnDataProviderIds_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getReturnDataProviderIds_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getReturnDataProviderIds_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getReturnDataProviderIds_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getReturnDataProviderIds_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text', 'parent_table_id');
vlist.setReturnDataProviderIds('parent_table_text');
var dispDP = vlist.getDisplayDataProviderIds();
for (var i=0; i<dispDP.length; i++)
	application.output(dispDP[i]);
var retDP = vlist.getReturnDataProviderIds();
for (var i=0; i<retDP.length; i++)
	application.output(retDP[i]);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUID|class=node}{tr:id=name}{td}h6.getUUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getUUID_des|text=|trigger=button}{sub-section}{sub-section:getUUID_des|trigger=none|class=sIndent}Returns the UUID of the value list{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getUUID_snc|text=|trigger=button}{sub-section}{sub-section:getUUID_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:getUUID_prs|text=|trigger=button}{sub-section}{sub-section:getUUID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getUUID_ret|text=|trigger=button}{sub-section}{sub-section:getUUID_ret|trigger=none|class=sIndent}[UUID]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getUUID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getUUID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getUUID_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getUUID_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
application.output(vlist.getUUID().toString());
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDisplayDataProviderIds|class=node}{tr:id=name}{td}h6.setDisplayDataProviderIds{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setDisplayDataProviderIds{span}{span:id=iets|style=float: left;}\(dataprovider1, \[dataprovider2\], \[dataprovider3\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setDisplayDataProviderIds_des|text=|trigger=button}{sub-section}{sub-section:setDisplayDataProviderIds_des|trigger=none|class=sIndent}Set the display dataproviders. There can be at most 3 of them, combined with the return dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be displayed
by the valuelist.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDisplayDataProviderIds_snc|text=|trigger=button}{sub-section}{sub-section:setDisplayDataProviderIds_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDisplayDataProviderIds_prs|text=|trigger=button}{sub-section}{sub-section:setDisplayDataProviderIds_prs|trigger=none|class=sIndent}dataprovider1 -- The first display dataprovider.
\[dataprovider2\] -- The second display dataprovider.
\[dataprovider3\] -- The third display dataprovider.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setDisplayDataProviderIds_ret|text=|trigger=button}{sub-section}{sub-section:setDisplayDataProviderIds_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDisplayDataProviderIds_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDisplayDataProviderIds_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDisplayDataProviderIds_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDisplayDataProviderIds_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDisplayDataProviderIds_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDisplayDataProviderIds_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setReturnDataProviderIds|class=node}{tr:id=name}{td}h6.setReturnDataProviderIds{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setReturnDataProviderIds{span}{span:id=iets|style=float: left;}\(dataprovider1, \[dataprovider2\], \[dataprovider3\]){span}{td}{tr}{tr:id=des}{td}{sub-section:setReturnDataProviderIds_des|text=|trigger=button}{sub-section}{sub-section:setReturnDataProviderIds_des|trigger=none|class=sIndent}Set the return dataprovers. There can be at most 3 of them, combined with the display dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be returned
by the valuelist.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setReturnDataProviderIds_snc|text=|trigger=button}{sub-section}{sub-section:setReturnDataProviderIds_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setReturnDataProviderIds_prs|text=|trigger=button}{sub-section}{sub-section:setReturnDataProviderIds_prs|trigger=none|class=sIndent}dataprovider1 -- The first return dataprovider.
\[dataprovider2\] -- The second return dataprovider.
\[dataprovider3\] -- The third return dataprovider.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setReturnDataProviderIds_ret|text=|trigger=button}{sub-section}{sub-section:setReturnDataProviderIds_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setReturnDataProviderIds_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setReturnDataProviderIds_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setReturnDataProviderIds_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setReturnDataProviderIds_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setReturnDataProviderIds_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setReturnDataProviderIds_sam|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}