Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert-app-forms - calculations are evaluated regardless of their relevance #436

Open
kennsippell opened this issue Oct 1, 2021 · 0 comments

Comments

@kennsippell
Copy link
Member

kennsippell commented Oct 1, 2021

Enketo evaluates calculation fields regardless of their relevance condition.
https://community.kobotoolbox.org/t/calculate-in-dynamic-repeat-activated-despite-skip-giving-error-for-online-submission-edit/15565/28

This is confusing and not intuitive and reults in some confusing investigations like medic/cht-conf-test-harness#133. In general, errors appear as JavaScript console errors like Evaluation failed: FormLogicError.

The developer experience would be improved if we brought these errors earlier. It would be an improvement if cht-conf errored (or warned?) when calculate fields have a relevance condition. This can always be implemented as if(relevance_condition, calculate_logic, '')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant