Workflows Enabled by Case Management
How to Create an Edit Form in CommCare
Overview
In some scenarios, a data collector may need to review previously submitted data and make corrections to ensure that outdated information is updated with the latest and most accurate details. In such cases, we recommend creating an edit form for the relevant forms.
This guide walks you through the process step by step and includes an example to illustrate the concept.
Steps to Create an Edit Form
Step 1: Choose the Form for Which the Edit Form Will Be Created
Choose the form that requires an edit form.
Ensure that all the questions you want to make editable later are saved to case properties. This can be done in the Case Management tab under Form Settings.
Step 2: Create the Edit Form
There are two ways to create an edit form:
Approach 1:
Add a new follow-up form right after the form you want to make editable. This makes it easier for users to track the form. Name it appropriately, such as "Edit Registration" or "Edit Child Details."
Copy all the questions from the original form that you want users to review or edit. Use Copy-Paste (Ctrl+C and Ctrl+V) and paste the questions in the new follow up form. Do not make any changes to the sequence or names of the questions.
Approach 2:
If the form is too long, follow these steps:
Open the form for which you want to create an edit form.
Click either "Manage Case" or the settings button next to the form name.
Click the Actions button and select the menu where you want to copy the form, as shown in the GIF below.
Rename the form from “Copy of [Form Name]” to “Edit Form” or “Edit Registration Form.”
Go to the Form Settings of your newly created edit form and ensure it is set as a follow-up form.
If you copied a registration form, change it to a follow-up form and mark it accordingly, as shown in the GIF.
Step 3: Configure the Edit Form
Once the form has been created with copied questions, for each question, set its default value using the corresponding case property. .
You can drag and drop case properties from the respective case_type section in App Properties lane present in the middle of the form builder page. tab or manually enter the syntax using
#case/case_property_name
as shown in the gif below.
Example: If the Registration Form saves a date of birth as
dob
, set the default value for the date of birth question in the Edit Form todob
.
(Optional): You can Create a multi-choice checkbox question asking, "Which fields would you like to edit?" Basically allowing users to choose which fields would they like to edit.
If included, set display conditions on each question so that they appear only when selected.
After configuring all default values and display conditions, go to the Case Management tab and ensure all necessary questions are saved back as case properties.
This ensures that changes made in the Edit Form overwrite the existing case properties correctly.
Step 4: Test your edit form- by logging in as a test user and see how the Edit forms update works.
By following these steps, you can create a functional and user-friendly Edit Form that allows data updates while maintaining consistency in your CommCare application.
Enabling Supervisor Review Workflows
This feature requires a CommCare Software Plan
This feature is only available to CommCare users with a Pro Plan or above. For more details, please see the CommCare Pricing Overview.
Impacts Case Loads
This workflow relies on saving all questions as case properties, which will make your cases larger, and could potentially impact overall application performance.
Many projects have a workflow where a front-line worker (FLW) collects data, and a supervisor reviews it. While it’s not possible to hold off on sending this data to the server before supervisor approval, you can build your app to enable such a workflow.
In this setup:
The FLW collects and submits data.
The supervisor reviews and approves it.
A data consumer (e.g., a manager at HQ) can later see whether the data was supervisor-approved.
The workflow looks like this for an FLW, and this for a supervisor.
NOTE: For supervisors to review cases submitted by FLWs, the app builder must:
Enable case sharing
and configure a case sharing group that includes both FLWs and their supervisors, OR
Use the Organization Structure to assign FLWs and supervisors to appropriate locations, ensuring supervisors can access cases from their assigned FLWs.
Steps to Enable Supervisor Review in Your App
Define User Roles: Go to ‘Edit User Field’ under Users tab and define custom user data to create a
"position"
field that differentiates supervisors from FLWs. (see video demo here)
Save Questions as Case Properties: After adding questions to your registration and follow-up forms, make sure all questions are saved as case properties in the original form.(see video demo here)
Create a Supervisor Review form: Copy the form to make a new supervisor version (see video demo here) and do the following:
Save all questions as case properties
Add in the default value for all questions
Optional-- add in a display label at the beginning that shows all the answers the FLW entered
Enable Supervisor Review Logic: Add in calculations to pass the form between FLW and Supervisor (also see video demo here) and do the following:
Add the hidden value ‘ready_for_supervisor’ into both forms and save it as a case property
In the original form for flw, set the calculation to “yes”
c. In the supervisor version of the form, set the calculation to “”
5. Set Form Display Conditions: Add form display conditions to hide/ display forms based on role (see video demo here), and do the following:
Add- #user/position = “supervisor” for the supervisor form and #user/position = “flw” for the FLW form
Add in case list filtering ready_for_supervisor = “yes”
Testing the Workflow:
As an FLW:
Log in, register a case, complete the follow-up form, and sync the app.
Log out.
As a Supervisor:
Log in, clear user data, and sync the app.
Open the 'Supervisor Approval Form' to review pending cases.
Approve the case—once approved, it will disappear from the supervisor’s case list and be available to the data team in the backend.
Service Delivery / Referencing Information from Your Last Visit
CommCare makes it easy to pull information from a previous visit into a follow-up form using case properties. This is especially helpful in service delivery programs, where users need to refer to past data from the previous visit for the same person or entity.
For example, a health worker can bring in details from a Registration Form into a Follow-Up Form, so they have the latest information without needing to ask the same questions again. This helps ensure a smooth visit, saves time, and improves accuracy.
Whenever you choose 'Save Question to a Case Property' in CommCare, two options appear in the form builder:
Left Side: Load information from a case (a saved record) into your form using the App Properties section. This allows you to display or use data from a previous visit.
Right Side: Update case details with new answers from the form, ensuring the latest information is stored for future visits.
This helps keep records up-to-date and makes follow-up visits more efficient.
How to Enable Referencing Information from the Last Visit/Previous Form
If you want to bring data from a previous form (like a Registration Form) into a Follow-Up Form, follow these steps:
Find the ‘App Properties’ box in the middle panel.
Select your case type (e.g., child).
Drag the case property (saved data) into your current form. You can place it in:
A Label question (to display the information).
Hidden Value (to use it in calculations).
Choose a name – You can keep the same name as the case property or give it a new one.
Check the GIF below to see how it works in action.
Applications of Referencing Information from the Last Visit in CommCare
Saved case properties help retrieve past data for better decision-making and efficiency. Here’s how:
Displaying Past Visit Info
Show a patient’s last recorded weight or previous diagnosis in a follow-up visit.
View a child’s past vaccination records to ensure timely immunization.
Use a Label Question to display past data.
Using Past Data for Calculations
Growth Monitoring: Calculate weight gain/loss using previous weight.
Medication Refill: Auto-calculate the next visit date based on the last visit.
Use Hidden Values for automatic calculations.
Setting Up Alerts and Conditions
Alert users if a child’s weight-for-age score is low.
Trigger a follow-up if a patient’s blood pressure was high last visit.
Use Display or Validation Conditions.
Auto-Filling Data to Save Time
Pre-fill family details in a follow-up form.
Auto-load last season’s crop yield data for farmers.
Load case properties into Text or Multiple Choice Questions.
You can use these techniques that will allow your follow-up visits become faster, more accurate, and data-driven!