Dynamic Lists
Lists powered by SQL and how to use them
Last updated
Was this helpful?
Lists powered by SQL and how to use them
Last updated
Was this helpful?
This question type allows a list of options to be dynamically presented to the operator by using a key value, either passed to Keyfax in the Start-up XML (for example TenantID, AssetID, Tenancy) or picked up within the scripts and stored in a Databox. A value is returned dependant on the operator’s selection, which can in turn be written to a databox for subsequent use.
Admin Display - a descriptive name to identify the Question.
Operator Display - the Question text as displayed to the Operator.
Display all items – If checked then display all items on the page, if not checked then the operator will need to scroll if there are more options than defined in the “Scroll items per page” value.
Scroll items per page – number of items displayed before the operator needs to scroll.
Database – Select which database is being queried
SQL Query – Build the SQL to query the selected database
Test – Test the SQL entered in SQL Query
Value column – column of the table in the database from which a value will be returned dependant on the option selected by the operator.
Record value - if checked the value will be added to the recorded text.
Display column(s) – Column of table in the database from which a value will be displayed to the operator
Clicking Test will present a dialogue showing the results of the SQL query. In this case, the selection of 'Black' will return a code of '4', for further use in your scripts:
This shows 5 rows returned by the SQL query with a scroll bar added
The code representing the choice made can be written to a Databox for subsequent use, .e.g.