Hi everyone,
I ran into a Capture app (web) issue a couple of months back and logged it in Jira. It hasn’t been picked up yet, so I wanted to raise it here to see whether others have hit the same thing and whether anyone has found a workaround.
When a data element (DE) field X is first hidden via program rule A, and then later made visible and mandatory via program rule B (once program rule A’s condition is no longer valid & program rule B’s condition for making the DE mandatory is valid), the web Capture app shows a “This field is required” error by default before any user interaction has taken place:
A few things worth highlighting:
- The error still appears after setting rule A’s priority to 1 and rule B’s priority to 2.
- It doesn’t happen if field X is never hidden and is only made mandatory by rule B. In that case the field behaves correctly and no premature error is shown.
- It doesn’t happen in Android app.
To reproduce:
- Create a data element field X.
- Create program rule A that hides field X when a condition is met, e.g. a Yes/No data element “Has condition” with the expression
#{hasCondition} == true. - Create program rule B that makes field X mandatory, using the oppsosite condition:
#{hasCondition} != true. - In the Capture app (web), enter data so that rule A’s condition is true so that field X becomes hidden.
- Then change the data so that rule A’s condition is no longer true so that field X becomes visible again and rule B makes it mandatory.
I’d really appreciate it if anyone has found a workaround for this issue while we wait for it to be fixed.
Thanks!
