Get Value

This activity is used to get the value of a specified key from the dictionary.

Technical Reference

 

 

INPUT

Dictionary: Specify the name of the dictionary from which we need to get the value.

Key: Specify the name of the key for which the value is required

 

 

 

 

 

 

 

 

MISC

ArgumentType1: This indicates the type of the key which was used in the dictionary. Choose it the drop from down.

ArgumentType2: This indicates the type of the value that was used to represent 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.

Value: Declare a variable here to view the value of a specified key.

*Mandatory fields to execute the workflow and view the dictionary value.

Use Case

We will be using the continuity of the same example that we used in add to dictionary
activity. The following activity illustrates how we can use the get value activity to derive
the value of a specific key from the dictionary. Here we are going to get the value for the 
key "John" and view it in a message box.

Steps to execute the bot

1.     Drag and drop a get value activity from the dictionary tab below the add to dictionary
activity.

2.      Specify the name of the dictionary from which the value must be derived. Here it is
DictNameAge.

3.      Enter the key for which the value is required within double quotes. Here we will get
the value for the name “John”.

4.     Declare a variable in the Value box of Output segment. Let’s use Jvalue here.

5.     Drag and drop a message box below the get value activity to view the details.

6.     In the input string add the declared variable and .ToString to it as the message box
accepts only string values. E.g., Jvalue.ToString

7.     Execute the activity.

The bot executes the activity and derives the value for the key “John”.