Testing calculate field on CHT 4.1.0

I have a calculate field in my form whose value is as follows:

if(selected(${child_vomit},“yes”) or
selected(${child_convulsions},“yes”) or
selected(${child_lethargic},“yes”) or
selected(${child_fever},“yes”) or
selected(${child_severe_diarrhea},“yes”) or

The calculate field is used to show/hide certain sections of the form. If the calculate field is relevant during form submission, then all the sections that use this field as a relevancy condition are shown. However, if the calculate field become irrelevant (ie the path taken in the form does not trigger it), then the subsequent sections do not appear. How can I fix this?

I see you mentioned on CHT 4.1.0. Did this form behavior work as expected with 3.x, but it has changed in 4.x or is this just a general form behavior question?

In general, the value of a non-relevant field should not be referenced by other relevant fields. Some of the complexity here can be avoided by just putting the calculate at the top-level with no relevant expression so that its value is always calculated.

In this case, I am also curious if perhaps you are running into one of the know issues we have documented for 4.x where there is an inconsistency between what is displayed in the form vs what is saved in the report…

@jkuester, it worked fine in 3.15.

Here’s the link to the form. Please check the



Resolved by checking for refer_child_danger_sign = null in addition to checking for refer_child_danger_sign = 0.