Value Lists Using Tables and Views
You can use tables and views to select parameter values, validation lists, and selection lists.
Here's a sample configuration from the xls.handlers table:
ID | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | EVENT_NAME | HANDLER_SCHEMA | HANDLER_NAME | HANDLER_TYPE | HANDLER_CODE |
---|---|---|---|---|---|---|---|---|
s02 | usp_cashbook | company_id | ValidationList | s02 | companies | TABLE | id, +name | |
s02 | usp_cashbook | company_id | ParameterValues | s02 | companies | TABLE | id, +name |
Note the HANDLER_CODE values: id, +name
. This code specifies the selected columns and their sort order.
When you use SaveToDB and DBEdit, they execute the following command based on this declaration:
SELECT id, name FROM s02.companies ORDER BY name
ODataDB publishes these validation lists as FunctionImports that return collections of read-only EntitySets. The FunctionImports are named like s02_companies_select_id_name_order_by_name
.
DBGate publishes these validation lists using the system $select and $orderBy parameters, formatted as:
s02/companies?$select=id,name&$orderBy=name
Value lists can be filtered or dynamic and can accept one, two, or three columns.
For more details, see Filtered vs. Dynamic Lists.