With the Question Table and Description Field and Survey Definition Table and Field ready to go, you can bring the questions into a third table, Surveys, to create finished surveys and questionnaires.
Creating a Survey Presentation Field
First, create the Surveys table you want to use to store the finished surveys.
- Click the Setup gear in the top-right corner, click Tables, select the Table Tree, and click New to create a table. For more information about creating tables, see Table Wizard.
- Create any fields you want to use to identify or categorize the surveys.
- Then, create a new Survey Presentation field.
- On the General tab, enter a name for the field, such as Survey Questions.
- In the Answers Fields Prefix field, enter up to ten characters to use as a prefix for any Questions that were given a name when they were defined. Names are used to display answers in a table view, search on answer values, or include the values in a report, but even if you didn't name any of the questions, enter a prefix here in case you name any questions in the future.
- On the Options tab, select a default survey. This determines the set of questions that automatically appears in the Survey Presentation field. This setting can't be changed once the field is saved.
- The first option is a fixed field reference that you can use to choose a specific survey definition. This is the least common option. To use it, select a table containing a Survey Definition field; then, select the field itself; then, you can use the look-up to search and select the survey.
- The second option uses a saved search to identify a question set from the appropriate table. For example, if your Survey table and your Survey Types table both have a Survey Type field, you can use a saved search to match the two variables and identify the Survey Type record that is appropriate for the Survey. Then, the set of questions from that Survey Type record is pulled in.
- The third option uses a linked set of fields from the Survey Types or Question Sets table, where the linked set includes both the Survey Definition field and the Survey Type field from that table. Selecting the type links directly to the Survey Types table and populates the relevant questions.
- Configure the settings for conditional visibility and conditional editing. These settings are similar to the settings for other types of fields.
- Choose whether to include a search pop-up to allow users to pull in a saved set of questions for a specific set of answers. This feature is designed for storing and reusing static sets of data, such as customers entering their environment details into service requests. For this scenario, the initial set of answers needs to be saved to a new record, using an Action Button running a Data Conversion Action that maps the Survey Presentation field contents into another Survey Presentation field in another table.
- To use this feature, select "Add search pop-up to this field" and choose the other table that stores the user's saved set of answers. When used, it only displays records in that table that include the same survey definition as the record the user started on.
- Set a view to be used for the look-up window.
If desired, select the Execute Actions checkbox and define actions to run. This allows you to pull in the ID of the record in the other table, for instance, along with any other linked fields that you might want from that table.
If desired, set up a warning to show the user if they import a record with a different list of questions from the current definition.
Creating a Survey Record
When a user creates a new Survey record, the system automatically displays the configured default survey.
When the survey is complete, any named Questions can be used in searches and reports to look at specific answer values. Named questions not in a particular survey will have blank values for that record. Note that the survey presentation field itself is not searchable, but the entire survey can be copied into a text field to allow text searching on it.