Question on conditional

I have a survey where I want farmers to be able to select the markets they supply from a list. I want them to be able to select multiple markets, if relevant to them. I also need separate follow up questions for each market they select. After those follow ups, i want them to be able to select other markets, or if there is no other market they supply, i want the survey to continue. Is there a page which explains how I can do this? Or perhaps if you could let me know what type of questions these are I could search for info on them. Thanks!

You could approach this in the following way:

Have a checkbox question where the user selects all the markets they supply from a list.

Then have a repeat group where the repeat count is the number of items selected in the checkbox question. You can use count-selected for that.

Inside that repeat group, you should be able to use selected-at and position to reference the current market.

Thanks Ethan,
thats really helpful. im trying it now and am getting this error message

Validation Error: Expected XPath path, got XPath expression: [count-selected(where_do_you_sell)],null in form "Value Chain Survey" Form in the "Value Chain Mapping" Menu

from what ive seen online it could be something simple like missing "".

right now ive got the repeat condition as: count-selected(where_do_you_sell)

I dont know how to add the "selected as" and "position" into the repeat group.

Thanks ! kirt

I believe you need to move that repeat count calculation to a hidden value, then reference that in the Repeat Count field (it doesn't support expressions there).

The links in my last message have some guidance around using selected-at and position, but what I mean is that you'll be able to use position to find out which iteration you're on in the repeat group (first selected market, second selected market, and so on), and selected-at to lookup which market that corresponds to. You can use these to build out whatever logic you need inside the repeat group.

These topics are too complex to cover definitively here, I'd do a bunch of reading on the wiki and play around with things to see if you can get it working.

thanks brother, this info has been really helpful.