Relevant field or skip logic not working

Depending upon Yes or No the "Name of Respondant" should disappear and appear.

<bind nodeset="/data/group_ad9sc65/Is_the_Head_Teacher_Present" required="true()" type="string"/>
<bind nodeset="/data/group_ad9sc65/Name_of_Respondant" required="true()" type="string" relevant="(/data/group_ad9sc65/Is_the_Head_Teacher_Present='No')"/>

But the field does not appear if I select 'No' and it does not appear in form itself ! Any suggestions would be great :slight_smile:

Are you authoring your form directly in the XML or creating it in an XLSForm spreadsheet and converting it with Central or XLSForm Online? More people will be able to help troubleshoot if you're authoring in a spreadsheet.

hey @danbjoseph I am authoring it directly in the XML and uploading to odk central.

I am not familiar with XForm, just XLSForm. Someone with experience in XForm may need more of your form. What's the code for the options for the first question look like?

@danbjoseph Thanks for help.

<text id="/data/group_ad9sc65/Is_the_Head_Teacher_Present:label">
                        <value>Is the Head Teacher Present</value>
                    </text>
                    <text id="/data/group_ad9sc65/Is_the_Head_Teacher_Present/yes:label">
                        <value>Yes</value>
                    </text>
                    <text id="/data/group_ad9sc65/Is_the_Head_Teacher_Present/no:label">
                        <value>No</value>
                    </text>

is the name lowercase and the label uppercase? in that case your relevant formula would need to use lowercase.

i actually tried in xlsx as you said and it worked and about xml i think i tried both with upper and lowercases but no luck.
Thanks for helping :slight_smile:

1 Like