Desktop User Guides > Author > Creating questions and responses > Question type overview > Creating database questions > Filter dialog
 
Filter dialog
In the Filter dialog, you can write mrScript that further filters the response list that is returned from the database (on the Script tab), or compose SQL Where clauses in the WHERE section.
When editing from the Questions pane (metadata), only the SQL tab is available.
When editing from the Routings pane (script), both the SQL and Script tabs are available.
Notes
There are some limitations when editing mrScript directly in the Base and Script tabs. The limitations are the result of the In operator, which is not supported when customizing filter strings. For example, the following string is blocked by the SQL validation logic:
MakeID in ('Audi', 'BMW')
You could remove the In operator, like this:
MakeID = 'Audi'
or
MakeID = 'BMW'
You can provide support for the In operator by turning off database question filter validation. For example:
Mdmdoc.EnableDBQuestionFilterValidation = false
The property can be changed in Metadata Model Explorer, on the properties list pane, when you select the Document node in the left tree. You can also change the property in UNICOM Intelligence Professional by adding the following in the metadata section header:
DBQuestionFilterValidation = false
Turning off database question filter validation is not recommended as it might result in SQL injection issues.
See also
Creating database questions