Data Map
This tutorial demonstrates how to create and work with a Data Map component. You will learn how to pass data to it, update it dynamically while the form is displayed, and extract the data. In this example, we will focus on currency rates, using a dictionary with key-value pairs representing different currencies and their equivalent values in USD. By interacting with buttons, you can extract and modify the currency rates in real-time while the form remains visible.
-
Create a new form and add the following components:
-
Add a Data Map component. Remember the Property Name you assign to it, because you will use it to extract and dynamically update the data in the component.
In this example, use
dataMapas the Property Name. -
Add a Button component to extract the data in the component. Set the Action of the button as Event.
Name the button
Extract data. -
Add another Button component to change the data in the component. Set the Action of the button as Event.
Name the button
Update value.
-
-
In the Main workflow create a dictionary variable and add key-value pairs to it.
In this example, use the key-value pairs shown in the image below.

-
Add a Show Form activity with Continue workflow execution enabled. This allows the form to display while other trigger workflows run simultaneously.
- In the Arguments collection, pass the previously created dictionary variable to the Data Map component in your form.
-
Add a Run Local Triggers activity to enable all triggers in your project.
-
Create a trigger workflow for updating values in the Data Map at runtime. Name the trigger workflow
fieldChangedTrigger.-
Add a Form trigger activity, and set the Event as the button used for updating the Data Map values.
In this example, set the Event to
Update value clicked. -
Add a Get Form Values activity to extract the current values of the Data Map into a dictionary variable.
In this example, save the current values to a variable named
dataMap2. -
Use a For Each activity to iterate through each key-value pair and update them with a specific value.
-
Inside the For Each activity, add an Assign activity to initialize a new key-value pair that you want to update the Data Map with.
- Save the pair to a variable named
newItemusing the Save to field. - Specify the new key-value pair using the Value to save field:
New KeyValuePair(Of String, String)(currentKeyValuePairOfTextAndText.Key, currentKeyValuePairOfTextAndText.Value).
- Save the pair to a variable named
-
Within the For Each activity, add an If activity to conditionally modify the
EURpair. Configure the condition using the object used to iterate through the Data Map.In this example, configure the following condition:
currentKeyValuePairOfTextAndText.Key = "EUR" -
Inside the Then body of the If activity, add an Assign activity to update the
newItemvalue with the desired new value.- Use the Save to field to assign the
newItemvariable. - Use the Value to save field to provide the new value of the pair:
CType(New KeyValuePair(Of String, String)("EUR", "1.19 USD"), KeyValuePair(Of String, String)).
- Use the Save to field to assign the
-
Add another Assign activity to map the new value back into the dictionary.
- Use the Save to field to update the corresponding key-value pair in the
dataMap2variable. - Use the Value to save field to assign
newItem.ValuetodataMap2(newItem.Key).

- Use the Save to field to update the corresponding key-value pair in the
-
At the end of the workflow, add a Set Form Values activity to update the Data Map inside the form with the modified values.
-
-
Create a trigger workflow to extract values from the Data Map at runtime. Name the trigger workflow
extractDataTrigger.-
Add a Form trigger activity and set the Event as the button used for data extraction.
In this example, set the event to
Extract data clicked. -
Add a Get Form Values activity to extract the current values of the Data Map at runtime. Save the Data Map into a dictionary variable.
-
Use a For Each activity to iterate through each key-value pair in the Data Map and output them in the console.

In the animated image below, witness the dynamic update of values within the Data Map as you click the
Update valuebutton.
-
Workflow example
To follow the steps and try out the tutorial yourself, check out the sample project here.