Survey123 Data Validation error

477
1
08-23-2020 11:15 PM
MorgenChalmiers
New Contributor

I receive the following errors when I try to convert the attached XLSForm (relevant fields highlighted in yellow). 

Basically I am collecting data related to sexual and reproductive health and would like to do the following two things

1. If a woman has had more 1 or more live births, I would like the question about the year of her first birth to display, so I have entered the following expression in the "relevant" column: $(livebirths) > 1 

2. I would like to calculate the age of each partner at the time of marriage using the following expression: $(marriageyear)-$(wyob)

What am I doing wrong???

These are the errors

1. "ODK Validate Errors: XForm is invalid. See above for the errors. org.javarosa.xform.parse.XFormParseException: Encountered a problem with display condition for node [$(Y_P_1_)] at line: $(livebirths) > 1, Couldn't understand the expression starting at this point: , $(livebirths) >...

2. "ODK Validate Errors: XForm is invalid. See above for the errors. org.javarosa.xform.parse.XFormParseException: Invalidate calculate for the bind attached to "$(w_age_marriage)" : Couldn't understand the expression starting at this point: ,$(marriageyear)... in expression $(marraigeyear)-$(wyob)

Result: Invalid"

0 Kudos
1 Reply
DougBrowning
MVP Notable Contributor

Field names use {} not (). 

${livebirths} > 1 

Hope that helps

0 Kudos