dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #08693
CategoryOptionCombos: Confusing behavior with shared options
Dear all,
this might be a result of me misunderstanding the concept of CategoryCombos and
CategoryOptionCombos, but this is strange: when I share options between two
categories which are members of the same CategoryCombo, the generation of
CategoryOptionCombos seems to produce funny results.
I just reproduced this on the demo-site with the CategoryCombo "Implementing
Partners and Projects" (O4VaNks6tta) which comes close to what I need for my
dataSets with lots of custom dimensions. Hope you are not having a presentation
on that one right now ;-)
Given a CategoryCombo with two Categories, I'd normally expect to get a list of
CategoryOptionCombos with all the possible combinations of Options from the two
Categories. Of course, each CategoryOptionCombo should consist of only two
Options.
In the example I added two shared Options ("Missing" and "Others") to each of
the Categories. As a result I get CategoryOptionCombos with three Options
(https://play.dhis2.org/demo/api/categoryCombos/O4VaNks6tta.json) which should
not happen in my understanding. In my own test-scenario with 5 Categories in one
CategoryCombo, I even found CategoryOptionCombos with nine Options, while others
only have three.
Is it allowed to use shared options at all in this context?
Related question: given a valid CategoryOptionCombo from the above example with
the Combination ("Missing", "Others") - how can I tell, which Category is
"Missing" and which Category is "Others", e.g when I want to read the metadata
via api? The result is just an unordered list, I assume ...
Thanks for shedding light on this,
Uwe
Follow ups