XLSForm: How to set a constraint to validate a date of birth based on the age previously entered

To match the year of birth (date) with the age (integer):

  1. Insert a calculate row after the age row, and enter format-date(today(),’%Y’) – ${age} under the “calculation” column
  2. Insert a date row under the calculate row and enter format-date(.,’%Y’)=${name_of_the_calculation_line} under the “constraint” column

Category: Create a New Questionnaire, Questionnaires, Create Questionnaires, Questionnaire > Questionnaire

← Return to search results