Auto checked select_one based on field

Hello,
sorry, but your syntax in the if statement is wrong. Syntax is if(boolean condition, string then, string else).
So, you cannot use a set-construct like var= value in if returns.
See
https://docs.opendatakit.org/form-operators-functions/#control-flow for specification
Advanced calculate function using if-statement
and
http://support.kobotoolbox.org/en/articles/1913851-advanced-use-of-calculate-questions
Kind regards

2 Likes