Case name referencing

Hello again Jay

You're almost there. it's the same thing as i was explaining to you on the other post.

a multi-select will not return a single value. it'll return a set of caseID's separated by spaces. so, the "=" operator will always not find the exact caseID. it'll always have some other caseID's with it.

so what you want to do is
join(instance(‘casedb’)/casedb/case[selected( #form/farmers_present]/case_name,@case_id)]/case_name,",")

this will return a string of case_names, separated by commas, for the cases selected in farmers_present.

then you save that into a case property that will be available in a case download.

P.S: The correct forum for this type of inquiries is "users" section. The developers section is designed for those who have in-house implementations of CommCare and/or building other software that works WITH commcare. the users space is designed for questions and discussions the community has about building and using CommCare apps and exports.