Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconIdatlassian-check_mark
panelIcon:check_mark:
bgColor#EAE6FF

This is now supported in the Application Builder using the 'Custom Single and Multiple Answer Questions' add on. For more information about how to turn on this feature please see Feature Previews.

...

Multiexcerpt include macro
macro_uuid785c6088-0e28-4857-9b71-fdd34d840424
nameSoftware Plan - Standard
templateDataeJyLjgUAARUAuQ==
page[Internal] CommCare Public Management
addpanelfalse

Step 1: Turn on the Feature Preview

Inside your form, you want to display existing cases in a checklist or single select question.  To do this, you need to turn enable an Add On called "Custom Single and Multiple Answer Questions".  This allows you to display custom choice lists in forms (i.e. a list of case sharing groups) instead of just items from a Lookup Table.

  1. Go to your Application Settings , then Select the Add-Ons tab.

    Status
    titleUnknown Attachment

  2. Choose the button with three lines on the right-hand side that is next to the save button and select 'Calculatons'

    Status
    titleUnknown Attachment

  3. Turn on the "Custom Single and Multiple Answer Questions" addAdd-on Ons to enable the necessary feature:

    Status
    titleUnknown Attachment

...

  1. In your form, add a new Checkbox Lookup Table question

    Status
    titleUnknown Attachment

  2. Choose the Lookup Table Data item below the added question to configure the data that will be displayed in the question.  Choose the (...) button and enter the following:

    1. Set the query expression to instance('casedb')/casedb/case[@case_type='your_type']  (Replacing your_type with the case type you want to display)

    2. Set instance ID to casedb

    3. Set the Instance URI to jr://instance/casedb 

    4. Hit the Save button

    5. Set the value to @case_id 

    6. Set the label to case_name 

    Status
    titleUnknown Attachment

    Status
    titleUnknown Attachment
     

Variations

  • If you would like to restrict the cases shown to be only child cases of the chosen case which you are updating you can add the following to the end of the query: [index/parent = instance('commcaresession')/session/data/case_id]

  • If you would like to restrict the cases shown to be only open cases you can add the following to the end of the query: [@status='open']

 

See also: https://dimagi.atlassian.net/wiki/x/aILyfw.

  •