Valuelist Editor
The reference documentation for the Valuelist Editor
Overview
The Valuelist Editor in Servoy allows developers to create and manage valuelists efficiently. To access the editor, right-click the Valuelists node in the Solution Explorer and select "Create valuelist" or double click an existing valuelist that is showing in Solution Explorer List. See ValueList Object Model for properties that can be configured on a valuelist.
![](https://docs.servoy.com/~gitbook/image?url=https%3A%2F%2F3933488479-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FjpWd52BKwABWxF2lScUK%252Fuploads%252Fgit-blob-016213512e977abf54bf24afbd8ad9512970b2aa%252Fvaluelist.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b96ca711&sv=1)
Options
Below is a brief explanation of each option available in the editor:
Valuelist name: A unique identifier for the valuelist within Servoy. This name is used in scripts to reference this particular valuelist.
Valuelist type: Servoy currently supports four types of valuelist: Custom Values Valuelist, Global Method Valuelist, Table Values Valuelist and Relation Values Valuelist. You can select the type from the radio buttons and set specific properties for each type.
Custom Values[Custom Valuelist] A string with the elements in the valuelist. The elements can be separated by linefeeds, optional with realvalues. You can also use tags, i18n keys and null values ('^' represents null value)
Samples
Global Method Name[Global Method Valuelist] A reference to the method from a global scope that will be called to fill in the valuelist. See ValueList Guide - Global Method for more information about the method.
Lazy Loading[Global Method Valuelist] Global method valuelists usually have the lowest performance among all valuelists, this is why we added 'lazy loading' so components can only load the valuelist when values need to be displayed.This flag has to be set both on valuelist and in component spec, on the valuelist property. IMPORTANT: Usage of real & display values is not supported with lazy loading. Don't set lazy load if your method returns both real and display values!
Type Definition[Global Method Valuelist and Custom Valuelist] When a developer creates a custom or global method valuelist, it is not attached to a type (TEXT, INTEGER, NUMBER...). When the valuelist is set on a field which dataprovider is TEXT it is linked to TEXT dataproviders, and if it it used again on other field which dataprovider is NUMBER it will give an error. However this only happens at runtime and is hard for a developer to notice this behavior. Specifying the type of display and real values will ensure you will get a warning in Servoy Developer if you link component to a dataprovider whose type is not the same as in valuelist.
Table Datasource[Table Values Valuelist] Table Values Valuelist must define on which table it is based on. You should also define the columns that should make up the display and real values of the valuelist.
Relation Name[Relation Values Valuelist] Relation Values Valuelist must define on which relation it is based on. You should also define the columns that should make up the display and real values of the valuelist.
Display Value/Real value columns[Table Values Valuelist and Relation Values Valuelist] You should define both a display value and real value from the datasource (table datasource or foreign key relation datasource). You can also define a separator character if you want your display value to be a composite of two columns (and choose, for example a '_' character between them)
Deprecated[All Valuelists] You can set a deprecated info string and mark a valuelist as deprecated. This is only a flag to be used and displayed in developer.
Encapsulation[All Valuelists] You can set the encapsulation information of this valuelist. This is for better organization in Servoy Developer, you will get warnings if your valuelist breaks encapsulation. For valuelist there are two enacapsulation options, Public (default option) which means any usage is allowed and Module Scope which means valuelist should only be used within its own solution/module.
Comment[All Valuelists] Some internal information, documentation or reference you can add for your valuelist. Only for Servoy Developer usage.
Fallback Valuelist[All Valuelists] You can basically combine two (or more) valuelists using this option. All the operations on main valuelist are also done on the fallback valuelist.
Allow Empty Value[All Valuelists] Add by default an empty value in your valuelist.
Sorting Definitions[Table Values Valuelist and Relation Values Valuelist] You can define the sorting of your table. Multiple sorting columns, asending or descending sort, can be added.
Last updated