I have built a survey on commcare and one of the questions in it is: select the health facility - which is a look up table. When I create a report, I don’t see the question about the health facility, so I added a hidden value in the survey and dragged the question: select the hf into the calculate condition and saved the changes. Now I could add the hidden value to the report but when I fill the survey on the tablet and submit it, I can not see the health facility name in the report. Maybe that means the health facility is not captured in the hidden value. Any suggestions are welcome
i'm not sure why what you're saying is going on but perhaps you can gain some insight for troubleshooting if you click this button
on the lower right from the emulator screen, which will open another window that will show you what values are currently in the form
should let you know what values are being stored and where
Below is screenshot of the excel lookup table that I uploaded into my form. What I would like is to capture the value of the health facility name in a hidden value as forms are submitted by chws and have the value as column in a report. the question Iam referring to is the selected one in the form above. Sorry because the questions are in portuguese
What I was asking for was the configuration of your lookup table data in the app builder (the line under the one you selected)
In this, you should have something like this :
Lookup table : name of your lookup table
Value field : facility_name (because what you want is to capture the health facility name)
Label field : facility_name (I guess, since it is easier for your chws to choose this way)
You can add a filter if you want to reduce the number of choice based on the district the chw is in.
Below is the configuration of the lookup table data in the app builder. I have read the page you have suggested but I still don't figure out how I can save the facility name in a hidden value.
You can find instructions on how to load a reference to a lookup table on this wiki page, you'll need to write a reference which loads the value of the Multiselect question into an instance() reference to pull back out the facility name.
Is there more than one facility per district? You may need to add a second filter like [facility_id = #form/facility] if you are filtering on one more than one thing
You can put together multiple blocks of brackets, like
[condition_one = 'a'][condition_two = 'b']
to filter by more than one criteria. If you've introduced a filter into your lookup table, the first condition would likely be that filter, and the second condition would be the selection from the multiple choice question.
Thank you very much for your help. By putting together blocks of brackets as you suggested, I managed to get the facility name saved in the hidden value and it now shows in the report.