Questionnaire Designer examples

From Resco's Wiki
Jump to: navigation, search

This article describes several useful examples of using the Questionnaire Designer.

Automatically fill fields using On Load rule

You might want that some fields are automatically filled in when a user starts the questionnaire.

  1. Open On Load rule editor on a questionnaire.
  2. Set up a rule with the following logic:
    1. Add the condition If the questionnaire is new.
    2. Add Step: For the question Date and Time set the value to now.
    3. Add Step: For the question Filled by set the value to the current user.
  3. Save the rule, questionnaire, and test it in the application.

Rules example.png

Show additional question depending on previous answer using On Change rule

When a user answers a question in a certain way, you might want to display additional questions. For example, married users need to provide the name of their partner.

  1. Create a group with two questions:
    • A single choice question: Are you married? (Answers: Yes, No.)
    • A text question: Partner name. Invisible by default
  2. Select the first question and click On Change.
  3. Set up a rule with the following logic:
    1. Add the condition If: If the answer to the are-you-married question is Yes.
    2. Add Step: Then set visibility for the question partner-name to True.
    3. Add Else.
    4. Add Step: Else set visibility for the question partner-name to False.
  4. Save the rule, questionnaire, and test it in the application.

Rules example 2.png

Reuse questionnaire answers from related records

You can now use fetch variable {{Regarding}} to access (related) entity of activity, if the activity is regarding the record of the questionnaire. This means that you can reuse previous answers from a specific appointment, or a specific asset if opened through an appointment.

  1. Edit a questionnaire template in Questionnaire Designer.
  2. Select the top level of the questionnaire to display its properties.
  3. Set Reuse Answers to your preferred option other than Never.
  4. In the Reuse Fetch, click Modify.
  5. The default filter has four conditions.
    • Click Add Condition and add the following condition:
      Add filter.png
    • Click Variable and select Regarding, then click OK.
      Select variable.png
  6. Click Save & Close to close the filter editor, then click Save & Close to save the questionnaire template.