Tip |
---|
This is now supported in the Application Builder using the 'Custom Single and Multiple Answer Questions' Feature Preview. For more information about how to turn on this feature please see Feature Previews. |
So what you're looking to do is create a multiselect that lists cases to be selected? Unfortunately this is not supported in CommCareHQ's Application Builder. It can be done through a custom method described below, but is not recommended.
Warning | ||
---|---|---|
| ||
The instructions below are for advanced users only; Dimagi may not be able to help if you attempt to make changes to xml by hand and make a mistake. |
Warning | ||
---|---|---|
| ||
Full access to this feature is only available for projects on a Standard software plan or higher. For more information, see https://www.commcarehq.org/pricing/ |
Also see: Updating case properties based on the outcome of a multiple choice question
This is useful if, for example, you have a form where you want to check off which of your cases are attending.
Modifying the XForm
If you are comfortable hacking around in the XForm, you can set up what you want by setting up an "itemset" which is based on the case database.
If you are not already using a form which required selecting a case, you will also need to add this xml right above where the app places all of the <bind> tags
<instance id="casedb" src="jr://instance/casedb"/>
Essentially: You'd create a select question, edit the XML, find the <select> block which represents your placeholder question and replace its <item> tags with the following (Only the bold parts of the XML below are changes. Everything else is what was there before). You'll need to include your case's "type" in the xml where noted
...