We have some questions from an app that is linked to different country apps. We want to restrict certain question groups to users from a country. We have created a country organization level for users. What is the code that should be put in the display condition in order to ensure that only that country sees the group of questions?
@edatworldvision : You can use the following calculation
instance('locations')/locations/location[@id =instance('locations')/locations/location[@id = instance('commcaresession')/session/user/data/commcare_location_id]/@country_id]/site_code = *{*your-country-site-code*}*
where your-country-site-code is a unique code assigned to each country location and is present in location's setting like this :
Thank you for this Ashish but I'm getting an error message when I posted in what you said with 'malawi':
@edatworldvision : I think it should be like this :
instance('locations')/locations/location[@id =instance('locations')/locations/location[@id = instance('commcaresession')/session/user/data/commcare_location_id]/@country_id]/site_code='malawi'