Show some information about the case at the top of the screen when filling out forms

Hi All,

Our data entry form requires a user first to select a Family from a case list and all clients belonging to the selected Family will appear in another case list. Once the client is selected a data entry form will be shown.

I wanted to show some information about the case at the top of the screen when filling out the form. I have enabled the “Show some information about the case at the top of the screen when filling out forms” check box for the Clients Case List and wrote some expression in the text box next to it. But it is not displaying that information when the form is opened for data entry.

I have even tried providing simple expressions like concat(" Total Count" , “Three”) in the expression box just to make sure that the problem is not related to the expression I provided.

Any help will be appreciated.

Best,

Hi,

What platform are you using to test the display? I believe that the feature you are describing isn’t supported by the “Live Preview” version of the app in the browser, so it may only appear when the app is actually deployed to a phone.

You should be able to use a calculated expression in that box as well as a direct case property reference.

-Clayton

Hi Clayton,

Thank you for your reply. I am using commcare Android to test the display, not the form player. I have tried to refer a case property as well. But it didn’t work.

But as I have explained earlier, I have used a Parent and Child case lists. The information is properly displayed when I try to provide a reference to a case property or calculated expression in the Parent Case List. But I doesn’t work when I provide the expression in the child case list.

Ah, I see.

Unfortunately I believe that it is a platform limitation that currently only one “context” line will be evaluated, so if the parent module defines one the context line from the second module won’t be visible.

-Clayton

Hi Clayton,

Thanks again for your reply. But is it not possible to display the context line only from the child module by removing expressions from the parent module? The most important information that we wanted to display is found in the child module.

Best,

My intuition is that the child module expression should work if you remove the expression from the parent module. I believe that the engine looks for the first available context frame to add to the view, so if only the child module has one it should appear.

Have you tried that and it doesn’t appear?

Hi Clayton,

Yes, I have tried that. But it didn’t work. That is what got me confused.

Odd, I just made a test app with a subcase / child module with the child case name selected and it seemed to work.

Can you describe how you have the modules configured a bit more? I have the child case module configured to choose the parent case first as follows:

Also: Did you uncheck the box for displaying information from the parent module, or did you just remove the expression? I think you need to uncheck the box entirely.

I believe I did the same thing. I have defined this in the settings part of a shadow form the following way.

I have also unchecked the box for displaying the parent case entirely.

Hi Dawit,

Is this part of a shadow module? If so, do you know if this module has been upgraded to the newest shadow module version (version 2)? I think this could be related to an issue we had with the legacy shadow modules.
You can see more information here: commcare-hq/advanced_app_features.rst at master · dimagi/commcare-hq · GitHub
If you do decide to upgrade, it is recommended to make a new build version before upgrading so you can revert if it makes changes to the app that you aren’t happy with.

Hi Clayton & Farid,

The issue is resolved now. We used kind similar naming when we define the case lists and I have been doing all the changes on the wrong case list. Ahmad (our technical support from Dimagi’s end spotted it).

Thank you all for your help.

Glad to hear that you and Ahmad were able to get to the bottom of the problem!