Value Lists Using Tables and Views
You can use tables and views to select parameter values, validation lists, and selection lists.
Here is a sample configuration in 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 |
Pay attention to the HANDLER_CODE values: id, +name.
This code defines select columns and the sort order.
SaveToDB and DBEdit execute the following command for this declaration:
SELECT id, name FROM s02.companies ORDER BY name
ODataDB publishes such validation lists as FunctionImports that return collections of read-only EntitySets.
ODataDB names such FunctionImports like s02_companies_select_id_name_order_by_name.
DBGate publishes such validation lists with the system $select and $orderBy parameters like
s02/companies?$select=id,name&$orderBy=name
Values lists can be filtered or dynamic and accept one, two, or three columns.