Can we calculate and validate the input in note feature

My aim of using note is that I do not want interviewer to manually change the age. Instead I want the age to be auto calculated and displayed based on the date of birth entered. Furthermore, I want to ensure that the age range is between 11-18.

I was trying to add constraints to a note in which I am calculating the age of the respondent using date features and subtracting it from the today’s date. I am able to auto fill the note but the constraint I entered is not working

Constraint I used: .>=11 and .<=18 under

I was able to use the above constraint on numeric feature and it works just fine.

Can I have an alternative to display the age automatically and the interviewer cannot manually change it or have a solution regarding how I can calculate and validate the age under note feature and display age automatically and error message if the age calculated is not between 11-18 ?

you can use a variable with read_only (column) set to true (or yes) combined with the calculation.
A constraint can stop the flow until the error is corrected.

Or you might use two different notes, filtered by relevant. And you can set the one for the error to required true to stop moving on/finalising.


I would like to support @wroos :tulip: solution.

1 Like