When I select one option in Kobo I want the below questions not to be mandatory

I want when I choose only from the list of Organization type: the Donor the following questions (Organization’s Name in Arabic:, Does the organization has offices in below hubs/ sub-hubs?, and Name of the responsible for the Information Management (IM):slight_smile: become not mandatory… Please help me with this

survey sheet:

type name
select_one source org_source

choices sheet:
list_name name label::English (en)
source a Donor
source b Government Agency / Entity
source c International NGO
source d National NGO
source e UN Agency

Welcome @sanad,
Do you use Collect or Enketo, please?

You can try as required clause: ${org_source} != ‘a’ and ${org_source} != ‘’, for the question(s) you want to set dynamically to mandatory.

A problem (bug?) is, at least in Enketo: After you have got a mandatory error message (e.g. on validation), this message is not automatically removed if you go back and change the referenced select question (e.g. to ‘a’). But it is removed on validation.

Here a simple example: RequiredDyn02.xlsx (11.3 KB). Only if ‘AA’ is selected, Text 01 becomes NOT mandatory. Tested with the Online validator, see ODK - XLSForm Online.

1 Like

Thank you for your reply.
I use Enketo Kobotoolbox
I tried ${org_source} = ‘a’ in the relevant column beside the question Organization’s Name in Arabic: this is good when I select Donor the the question Organization’s Name in Arabic is not mandatory, and this what I want, but for the rest of list the question Organization’s Name in Arabic not appear and what I want the question should I appear for the rest as a mandatory question

can I send you the file? via email

I did : ${org_source} =‘c’ or ${org_source} = ‘d’ or ${org_source} =‘e’ or ${org_source} = ‘b’
It’s worked perfectly. Thank you so much, I appreciate your support

1 Like

Sorry, I had first misunderstood your requirement and updated now the answer above. Your solution is fine too. Can you remove your 2 related postings above (2nd & 3rd), please.

Thank you, @sanad, for sharing the solution with the entire community! :clap: :heart: :partying_face: