LinkedIn
Copied!

Table of Contents

Validating answers in a questionnaire

Version:

Only available versions of this content are shown in the dropdown

Display an error message in your questionnaire when an answer is invalid, to ensure that the information that users provide is accurate and in an expected format. For example, if a user types letters in a phone number, your application prompts the user to enter only numbers in that field.

  1. Navigate to the questionnaire:

    Choices Actions
    Open the questionnaire in App Studio
    1. In the navigation pane of App Studio, click Case types.

    2. In the list of case types, open a case type of the Questionnaire type that you want to edit.

    Open the questionnaire in Dev Studio
    1. In the header of Dev Studio, click Configure Case Management Questionnaire .

    2. Click the questionnaire that you want to edit.

  2. Click the question for which you want to configure a validation.

  3. In the Question settings pane, in the Validations section, click the Properties icon.

  4. In the Validate fields based on these conditions dialog box, in the Message field, enter an error message that users receive if the validation fails.

    Enter Please correct your date of birth.
  5. Create a condition by providing a value to compare at run time, a comparator, and a value to compare against the first value.

    To ensure that users enter a date of birth in the past, create a condition that checks the date. For example, BirthDate is before 1/22/2021.
  6. Optional:

    To add more rows to the condition, click Add a row.

  7. If you create multiple rows, define whether an answer needs to meet all or any conditions by selecting either and or or between the rows.

  8. Optional:

    To add more validations, click Add condition, and then repeat steps 4 through 7.

  9. Click OK.

  10. Click Save.

If the validation fails at run time, users receive an error message. Users need to correct the answers with failed validation before submitting the questionnaire.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.