Set Value

This activity is used to update an existing value of a respective key. It overwrites the
value of the existing ones.

Technical Reference

 

 

INPUT

Dictionary: Specify the name of the dictionary in which the value has to be updated

Key: Specify the key whose value has to be edited

Value: Specify the new value that has to be updated in respect to the specified key.

 

 

 

 

 

 

 

MISC

ArgumentType1: This indicates the type of the argument that we have used for the key. Choose from the drop down.

ArgumentType2: This indicates the type of the value that represents the key value. Choose from the drop down.

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the Dictionary feature in use

OUTPUT

Result: Define a Boolean to validate if the activity has been completed successfully. This is not a mandatory field.

*Mandatory fields to execute the workflow

Use Case

Here we are going to use the continuity of the same example that we used in add to dictionary.
The following activity illustrates on how we can use the set value activity to update the value
for a key in the dictionary. We are going to set the value for the key "John" as "38", and 
view the updated dictionary values with a view activity.

Steps to execute the bot

1.      Drag and drop the set value activity below the view dictionary activity.

2.      Double click on the activity

3.      In the property box give the name of the dictionary as DictNameAge

4.      In the Key, enter the key for which the value must be edited. Here it is John “38”

5.      In the value, enter the new value that must be updated to the specified key. Here
it is John “40”

6.      Select the ArgumentType1 and ArgumentType2 as it is in the dictionary. Here it is
string and Int32 respectively.

7.      Drag and drop the view dictionary activity below the set value activity to view the
updated dictionary.

8.      Execute the workflow to see the updated dictionary.

The bot executes the activity and updates the value in the dictionary which can be seen
using a view activity.