Im setting up a survey for insect trapping and I want my question "set_number" to calculate my answer based on a particular date range submitted by the person who is filling out the survey.
I'm using the expression below, and it is not populating in the question.
if((format-date(${_date},'yyyyMMdd') >= '20260413') and (format-date(${_date},'yyyyMMdd') <= '20260417'), 'Set 1', '')
I also have the scripts function blank...not sure if that makes a difference. I am updating everything directly in my xlxsForm.
I do not think you can start a field name with an underscore.
I solved it...used this expression instead
if((format-date(${_date}, '%Y%m%d') >= '20260413') and (format-date(${_date}, '%Y%m%d') <= '20260420'), 'Set 1',")