Dear Community,
I’ve been testing the new multiple choice option set feature available in recent DHIS2 versions (Event & Tracker programs), and while it’s a great addition, I’ve run into a few challenges that I’d like to share — and hopefully get some guidance or suggestions.
1. Line Listing App Display Issue
When only one option is selected, the option name appears correctly in the Line Listing output (e.g., “Fever”).
However, when multiple options are selected, only the codes appear (e.g., “1,3”) — and not the names.
Also, these codes are not sorted numerically but reflect the order in which users selected them (e.g., “3,1,2” instead of “1,2,3”).
Is there a way to get the Line Listing app to return the option names instead of codes when multiple are selected?
2. Program Rule Complexity
Handling program rules with multi-select fields has become quite complicated.
If I want to show/hide a field based on selection of a single option (e.g., code “1”), I must now write rules that account for every possible combination that includes “1” in any position.
Example condition block:
#{5.b.iii. Tablet formulation} != “1” &&
#{5.b.iii. Tablet formulation} != “1,2” &&
#{5.b.iii. Tablet formulation} != “2,1” &&
#{5.b.iii. Tablet formulation} != “1,3” &&
#{5.b.iii. Tablet formulation} != “3,1” &&
#{5.b.iii. Tablet formulation} != “1,4” &&
#{5.b.iii. Tablet formulation} != “4,1” &&
#{5.b.iii. Tablet formulation} != “1,2,3” &&
#{5.b.iii. Tablet formulation} != “1,3,2” &&
#{5.b.iii. Tablet formulation} != “2,1,3” &&
#{5.b.iii. Tablet formulation} != “3,1,2” &&
#{5.b.iii. Tablet formulation} != “2,3,1” &&
#{5.b.iii. Tablet formulation} != “3,2,1” &&
#{5.b.iii. Tablet formulation} != “1,2,4” &&
#{5.b.iii. Tablet formulation} != “1,4,2” &&
#{5.b.iii. Tablet formulation} != “2,1,4” &&
#{5.b.iii. Tablet formulation} != “4,1,2” &&
#{5.b.iii. Tablet formulation} != “2,4,1” &&
#{5.b.iii. Tablet formulation} != “4,2,1” &&
#{5.b.iii. Tablet formulation} != “1,3,4” &&
#{5.b.iii. Tablet formulation} != “1,4,3” &&
#{5.b.iii. Tablet formulation} != “3,1,4” &&
#{5.b.iii. Tablet formulation} != “4,1,3” &&
#{5.b.iii. Tablet formulation} != “3,4,1” &&
#{5.b.iii. Tablet formulation} != “4,3,1” &&
#{5.b.iii. Tablet formulation} != “1,2,3,4” &&
#{5.b.iii. Tablet formulation} != “1,2,4,3” &&
#{5.b.iii. Tablet formulation} != “1,3,2,4” &&
#{5.b.iii. Tablet formulation} != “1,3,4,2” &&
#{5.b.iii. Tablet formulation} != “1,4,2,3” &&
#{5.b.iii. Tablet formulation} != “1,4,3,2” &&
#{5.b.iii. Tablet formulation} != “2,1,3,4” &&
#{5.b.iii. Tablet formulation} != “2,1,4,3” &&
#{5.b.iii. Tablet formulation} != “3,1,2,4” &&
#{5.b.iii. Tablet formulation} != “3,1,4,2” &&
#{5.b.iii. Tablet formulation} != “4,1,2,3” &&
#{5.b.iii. Tablet formulation} != “4,1,3,2” &&
#{5.b.iii. Tablet formulation} != “2,3,1,4” &&
#{5.b.iii. Tablet formulation} != “2,4,1,3” &&
#{5.b.iii. Tablet formulation} != “3,2,1,4” &&
#{5.b.iii. Tablet formulation} != “3,4,1,2” &&
#{5.b.iii. Tablet formulation} != “4,2,1,3” &&
#{5.b.iii. Tablet formulation} != “4,3,1,2” &&
#{5.b.iii. Tablet formulation} != “2,3,4,1” &&
#{5.b.iii. Tablet formulation} != “2,4,3,1” &&
#{5.b.iii. Tablet formulation} != “3,2,4,1” &&
#{5.b.iii. Tablet formulation} != “3,4,2,1” &&
#{5.b.iii. Tablet formulation} != “4,2,3,1” &&
#{5.b.iii. Tablet formulation} != “4,3,2,1”
This quickly becomes unmanageable as more options are added.
Is there a plan to introduce a “contains” logic or other simpler way to handle individual selections in multi-select fields within program rules?
Happy to hear how others are approaching this, or if there are workarounds I’ve missed.
Best regards,
George Shemang
Associate Information System - DHIS2 Developer
dhis2 #MultipleChoice #TrackerCapture #ProgramRules #LineListing #OptionSet #FeatureFeedback