In this lesson you’ll learn:
-
How to use the Data Mapper Helper to convert field values
-
How to dynamically set the input field based on workflow data variables
-
How to avoid using static values in your workflows
Introduction
Right now, our workflow sets the patient’s Gender field to a static value—Male
. That’s not very useful for real-world scenarios, where gender should be populated based on the form submission.
Also, DrChrono expects gender values like "Male"
, "Female"
or "Other"
, while Jotform submissions might return "M"
, "F"
, or even custom values.
We can see the issue here in our case as in Jotform our form has these values:
And in DrChrono if we open the "Gender" input we see that the expected values are:
In this lesson, you’ll learn how to fix this by using the Data Mapper Helper to convert form values into the exact values expected by DrChrono.
Step 1: Add a Data Mapper Helper
What is the Data mapper?
The Data Mapper works like a simple lookup table.
-
It takes data from previous steps (like form responses) as input.
-
Then, it outputs a new value based on a list of mappings you define.
You can learn more about the data mapper here
-
In your workflow editor, click the ➕ icon before the Branch step.
-
Go to the Helpers tab and select Data helpers and then Data mapper.
-
Configure the Datamapper:
-
Lookup key(s) : Map the Gender field from Jotform.
-
Mapping Values:
-
M
→Male
-
F
→Female
-
O
→Other
-
(Add more mappings as needed)
-
-
- Test the step to have the data available in the workflow and ensure it works as expected.
In that way we have configured the data mapper so when in Jotform the answer is M
then our helper will transform it to Male
so it is exactly as DrChrono expects it.
Step 2: Map the Transformed Value
-
In the Create/Update Patient step, click on the Gender field.
-
Navigate to the Steps tab and select the output from the Data mapper Helper.
📌 Important: Using the Datamapper ensures that your workflow always sends valid, expected values—even if the form response varies.
Step 3: Test Your Workflow
- Publish your workflow
-
Submit the form selecting
"M"
for gender.-
Verify that the workflow sends
"Male"
to DrChrono.
-
-
Submit the form with
"F"
.-
Ensure that
"Female"
is sent correctly.
-
Success!
You’ve now made your workflow more dynamic and reliable by mapping values automatically.
What's next?
You should now be confident building workflows that include logic control and data transformations to handle real-world automation scenarios.
Ready for more? Continue your learning journey with our Advanced Course, where you’ll master even more powerful techniques!
In the Advanced Course, you’ll learn how to:
-
Work with files in your workflows
-
Add code steps to perform advanced data transformations
-
Use For Each loops to process lists of items dynamically
-
Make custom HTTP calls to replicate actions not yet supported by built-in connectors
Next Course: (Advanced) Master Advanced Workflow Automation