I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?
It might help if you create your rules based on section that is to be hidden and not based on condition. This way you will have all the conditions to hide a section in one rule itself.
For eg- if you create following 3 rules, these should work-
Program rule 1: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 1
Program rule 2: When ‘Type of Cancer’ == ‘Breast’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 2
Program rule 3: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘Breast’ , Hide section 3
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?
It might help if you create your rules based on section that is to be hidden and not based on condition. This way you will have all the conditions to hide a section in one rule itself.
For eg- if you create following 3 rules, these should work-
Program rule 1: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 1
Program rule 2: When ‘Type of Cancer’ == ‘Breast’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 2
Program rule 3: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘Breast’ , Hide section 3
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?
It might help if you create your rules based on section that is to be hidden and not based on condition. This way you will have all the conditions to hide a section in one rule itself.
For eg- if you create following 3 rules, these should work-
Program rule 1: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 1
Program rule 2: When ‘Type of Cancer’ == ‘Breast’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 2
Program rule 3: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘Breast’ , Hide section 3
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?
Aruns original problem was that he had two rules that was hiding the same section. Gitika provided a workaround, but now the underlying cause is fixed in 2.24 →
If you have the same underlying problem, your section rules should now work. If your problem persists, please send more info on your version and how your rules is configured.
It might help if you create your rules based on section that is to be hidden and not based on condition. This way you will have all the conditions to hide a section in one rule itself.
For eg- if you create following 3 rules, these should work-
Program rule 1: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 1
Program rule 2: When ‘Type of Cancer’ == ‘Breast’ OR ‘Type of Cancer’ == ‘GI’ , Hide section 2
Program rule 3: When ‘Type of Cancer’ == ‘Cervical’ OR ‘Type of Cancer’ == ‘Breast’ , Hide section 3
Hey there Arun,
Which version of DHIS are you using? And is this tracker or event capture? It seems there is a bug when several rules are working to hide or show the same section - one of the rules will always win. What should have happened is of course what you expected: The section should be hidden if one or more rules tries to hide it. Will get back to you with a fix for this.
I am finding problem in doing dynamical hide and show of sections in a program form. It works well if there is only one section to hide and show, but acts weird if there are 2-3 sections to hide and show.
This is how I have designed the form.
My intention was to show the relevant risk factor section when a cancer type is selected.
Type of cancer: Breast/Cervical/GI
Section- 1: Breast cancer risk factors
Section - 2: Cervical cancer risk factors
Section - 3: GI cancer risk factor.
Program rule 1: When ‘Type of Cancer’ == ‘Breast’ , Hide section2&3.
Program rule 2: When ‘Type of Cancer’ == ‘Cervical’ , Hide section1&3.
Program rule 3: When ‘Type of Cancer’ == ‘GI’ , Hide section1&2.
It was working well when I had section1&2 and only 2 program rules with those sections, but when I added section 3 and changed program rules like above, the UI did not behave like I wanted.
Is this a bug? or the wrong way I created the rules?