I would like to customize report title in report list (for app forms) by adding fields available in the app form


Organization Type:
NGO supporting the Ministry of Health (Kenya) funded by CDC

What Other Organizations Would Benefit From This Feature:
Other organizations using the CHT platform

UI Feature Description
As a developer I would like to add a specific field or two to the report title in the report list so as to allow health care workers to efficiently (at a glance) distinguish between two reports generated using the same app form for the same contact.

What “Pain Point” Does The Proposed Feature Address:
Currently all reports submitted using the same app form for the same contact cannot be differentiated in the report list. To differentiate them one has to click on the report instance and view more information. Imagine doing that for 20 reports before locating the single one you’re looking for.

Proposed Solution:
A good way to solve this would be to list fields one would like to show on the reports list title (report_list_fields) as an array in the form.properties.json file (just like hidden_fields are listed) then avail those fields in the context when report titles are generated.

“hidden_fields”: [“outbreak_label”], >>Implemented
“report_list_fields”: [“outbreak”], >>Proposed
“report_title_key”: “reports.case_management.title” >>Proposed

reports.case_management.title = Case Management ({outbreak})

Do you have funding to cover external developers?

Do You Have Resources (Designers, Developers, PMs) Available:

To add some more context for future discussion, the report “summary” (displayed as the lower field in each item in the left-hand report list) is currently hardcoded to the title of the form associated with the report. I do not think there is any way, as of now, to configure this field.

However, @morlig, how close do you think you could get to your desired behavior by using the subject_key configuration? That would let you customize the upper field in each item and can include data from the report itself.

@jkuester This is what I get when I use the subject_key configuration.

“title”: “Case Management”,
“subject_key”: “report.title.case_management”


report.title.case_management = Case Management {{patient_name}}

patient_name is a field in the app form for “case management” on the base level (not in a group)

What could I be missing?

Results of the configs above

Unfortunately, after looking at this again, I realized I misunderstood this in the documentation: The translation uses a summary of the report as the evaluation context . The “summary” does not include all of the report fields, but only a limited sub-set of mostly special system-populated fields.

However, to just include some fixed text (e.g. “Case Management”) along with the name of the contact (the value that is shown by default when the subject_key is not set) you could use: Case Management {{subject.value}}. Alternatively, if you are not using the case_id functionality from the registration transition one work-around for loading custom data from the report is to save the data you want in a case_id in the form. Then, you can access that value in the subject_key via {{case_id}}

Thanks @jkuester; adding a calculate field case_id in the app form with the values that I require concat(${outbreak_name}, ' > ', ${patient_name}) solved it. Used together with the subject_key.


"title": "Case Investigation",
"subject_key": "report.title.case_investigation"

report.title.case_investigation = {{case_id}}


Note: This workaround doesn’t apply to the reports card on the patient’s profile page

I noticed that; in the reports card on a profile, report list subtitles only show sometimes. Still investigating this will create it as an issue once certain.

Although I can use conditional cards as suggested by @michael here Customize report title in report list (for app forms) - #6 by michael

1 Like