1. Click Products > Checklist > Questions > Lookup Configurations.
2. Click Add.
3. Select Database.
4. Use the dropdown field to select the desired database to use.
External databases are configured in Configuration > External Database Connections (see here).
5. Select the purpose of this lookup: Answers, Inclusion, or Validation.
6. Select whether you are using a Query or a Stored Procedure.
7. Click OK.
If you selected Query use the SQL Builder dialog to build the desired SQL statement.
For an example of how to build a query, see here.
If you selected Stored Procedure use the SQL Builder dialog to build the desired SQL statement.
8. Enter a description.
9. Click Lookup. A list stored procedures is shown.
Only stored procedures with the prefix _custom will be displayed.
10. Select the stored procedure that has been created for carrying out a database lookup.
11. Click OK.
The SQL Builder dialog is displayed again. The parameters section is filled with the required parameters for the stored procedure.
12. Select the first input parameter and click Edit.
13. In the Runtime dropdown list select the variable to associate with the parameter.
14. Click OK.
15. Repeat for all Input parameters.
To see which units will be included using this stored procedure click the Test button.
16. Click OK to save the lookup.