hideEmptyDisplayControl not working

“hideEmptyDisplayControl”:true is to hide sections where there is no data. Removing the entire section from dashboard.json will make it disappear and it won’t appear even if there are readings/observations for that section, which usually is not the desired behaviour.

I have tried with “hideEmptyDisplayControl”:true in dashboard.json for multiple sections and also tried removing the entire section to see if it disappears. No luck so far. Changes are not getting reflected at all. I have tried vagrant halt and up to see if changes gets reflected, also tried clearing the browser cache and running in incognito, nothing worked. Hoping to get some working solution here.

Hi @anuradhadhage, When we add “hideEmptyDisplayControl”:true to a display control which doesn’t have any observations, that display control is not showing up. But when we add some observations to the display control for which “hideEmptyDisplayControl”:true then that display control is showing up. And this is the desired behaviour as mentioned in this wiki . If its still not working for you, please share your json file here.

Hi @binduak ,

Thanks for your prompt reply and apologies for the delay from my end. I was not able to comment/reply on the thread all this time due to error ‘You can not create a poll’.

Anyways, coming back to a problem, I am not able to get sections without any observations to disappear with this “hideEmptyDisplayControl”:true setting. I understand that if there are observations for the section, it will display that section regardless of this setting. Attaching my dashboard json file for your reference.

dashboard.txt (21.8 KB)


Quick question - Which version of Bahmni are you using? This feature is available only from version 0.89 onwards.

@anuradhadhage I don’t see any problem with the json file. It looks good to me.

As @sruti pointed out can you check the Bahmni version and let us know

I think, I am using the latest one.

C:\bahmni\bahmni-vagrant>vagrant box list

bahmni-team/bahmni (virtualbox, 0.90)

I think, I found the issue. All this time I was modifying json files from C:\bahmni\default-config which was referred internally in vagrant box as /bahmni/default-config

But when I updated json file from /var/www/bahmni_config/openmrs, it worked.

The confusion started from https://bahmni.atlassian.net/wiki/spaces/BAH/pages/115780492/Configure+White+Labeling where location of the file to be modified is mentioned as default-config/openmrs/apps/home.

Not sure if it is a bug or documentation needs an update.

Thanks for your time on the issue @binduak, and @sruti. Really appreciate it.