Once the questions and survey definitions/question sets have been created, you are ready to start using the questionnaires. This will involve adding a field of the data type Survey Presentation to the table in which you want the questions to appear.
Field Wizard for Survey Presentation Field
The Field wizard for the survey presentation data type includes the following tabs.
After specifying the field label, you must provide an Answer Column Prefix. This is used as a prefix for the names of the virtual, searchable fields for any questions that were given a name when they were defined.
For example: if the Answer Column Prefix is "Spr_" and there is a question with the name "Satisfaction" a virtual, searchable field will be created called Spr_Satisfaction. Note: In earlier releases of Agiloft, an underscore was added automatically between the defined prefix and question name.
The Options tab is more detailed for this field type than for the other new types. Here you define a default survey to be used, conditional visibility, and whether a search pop-up should be added to the field.
You have three choices for the default survey.
The first option is a fixed field reference. It will allow you to choose a specific survey definition. After selecting the survey definition table and the survey definition field in that table, you may search and select the survey you wish to display. This is the least common option.
Let's suppose you want to pull in a different set of survey questions based on the value in a Survey Type field in the current record. You can do this using either of the next two options.
With the second option, you find the correct set of questions using a matching saved search against the survey definition table. You have a choice field for Survey Type in both the current Survey table and the table holding the survey definition field. Then you create a
Saved Search on the survey definition table. This search uses a variable to match the Survey Type value in the survey definition table against the variable Survey Type field in the current Survey table. It pulls in the matching set of questions for that Survey Type.
With the third option, you don't create a Survey Type field in the current Survey table, you just create a linked set of fields from the table containing the survey definition field that includes both the survey definition field and the Survey Type field from that table. The user selects the Survey type in the same way, which is really a link to the survey definition table, and that pulls in the definition field, and the survey presentation field then populates the questions matching that definition.
From an end user point of view, these two options are interchangeable and provide the same result.
A default behavior must be defined for the field and once the field is saved this is not changeable.
This is the standard visibility option, allowing you to determine the visibility of a field based on a choice or multi-choice value.
The purpose of the pop-up search option is to enable a user to pull in an already saved set of answers to a specific set of questions, effectively to reuse the answers. This was developed for the original use case where customers were providing environment details in a service request and wanted to store these answers to a saved Environment record to be able to reuse them.
For this kind of situation, the initial set of answers need to be saved into a new record, which can easily be done with an action button running a conversion action. The complete set of survey answers for a question set can be saved in a new record using a standard conversion action – the single Survey Presentation field can be mapped to a Survey Presentation field in another table and all question/answers will populate there.
Given this kind of context, adding the search pop-up lets you choose another table that has a survey presentation field in it and choose the particular survey presentation field, if there is more than one in that table. When used, it will only display records in that table that include the same survey definition as the current record from which the lookup is run. You can also set a view to be used for the lookup of the available records.
Selecting the popup option adds two buttons above the question set called "Load from [table name]" and "Reset". Clicking the Load.. button brings up a normal linked field lookup to find the matching records, those that use the same survey definition.
A record can be selected for import:
And when imported, the question set is refreshed with any answers. Note that if the question set itself has changed in the meantime, for example if new answers were added, the latest questions will be shown.
Under the search pop-up options you can also specify another field to be populated with other information from the imported record. 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.
You may also specify that the user receive a warning if they import a record with a different list of questions from the current definition.
Creating a Survey Record
Be aware that the survey presentation field displays the questions used in its definition with the appropriate answer fields.
The Reset button will restore the original set of questions – from before the saved record was imported – but leave the answers for any matching questions.
If any questions in a particular survey presentation are named, the virtual fields will be filled in with the appropriate values so that they may be used in a search. See the discussion of the Name field in the Creating a Question section.
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 – questions and answers – can be copied into a text field to allow text searching on it.