Validating answers in a questionnaire
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.
- Navigate to the questionnaire:
Choices Actions Open the questionnaire in App Studio
- In the navigation pane of App Studio, click Case types.
- 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
- In the header of Dev Studio, click .
- Click the questionnaire that you want to edit.
- Click the question for which you want to configure a validation.
- In the Question settings pane, in the Validations section, click the Properties icon.
- In the Validate fields based on these conditions dialog box, in
the Message field, enter an error message that users receive if the
For example: Enter Please correct your date of birth.
- Create a condition by providing a value to compare at run time, a comparator, and a
value to compare against the first value.
For example: 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.
- Optional: To add more rows to the condition, click Add a row.
- 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.
- Optional: To add more validations, click Add condition, and then repeat steps 4 through 7.
- Click OK.
- Click Save.
Previous topic Displaying questions in a read-only mode Next topic Displaying a warning in a questionnaire