You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no static analysis performed to make sure expressions have the correct syntax. In general, this is fine because as soon as a user opens a form definition in Validate, Collect or any other JavaRosa client, the full form will be evaluated and an expression with bad syntax will be identified.
However, this is problematic in the case of expressions that involve nesting, particularly with conditional logic. Consider for example the expression if (/data/my_var = 'yes', fake-function('bad', 'bad'), 0). If no one actually tries yes as a value for my_var, the fact that fake-function isn't supported won't be detected until a real user tries to enter yes and hits a runtime exception.
See getodk/validate#60 and most likely #480 for examples of how this has affected real users.
The text was updated successfully, but these errors were encountered:
There is no static analysis performed to make sure expressions have the correct syntax. In general, this is fine because as soon as a user opens a form definition in Validate, Collect or any other JavaRosa client, the full form will be evaluated and an expression with bad syntax will be identified.
However, this is problematic in the case of expressions that involve nesting, particularly with conditional logic. Consider for example the expression
if (/data/my_var = 'yes', fake-function('bad', 'bad'), 0)
. If no one actually triesyes
as a value formy_var
, the fact thatfake-function
isn't supported won't be detected until a real user tries to enteryes
and hits a runtime exception.See getodk/validate#60 and most likely #480 for examples of how this has affected real users.
The text was updated successfully, but these errors were encountered: