How to get Dictionary-Value from correspondent Dictionary-Key?

Hi,

I’m designing a little code snippet with the following characteristics:

  1. I have an empty Dictionary created with a <String,String> pair
  2. I have an Excel file with two columns that I transform into a DataTable and by consequence, when I loop the DataTable I add the rows into the Dictionary created on step 1.
  3. Then I have an InputDialog where it is requested for me to write something that could be or not a Key from the Dictionary.

My goal is the following one: If the variable I sent to the InputDialog is equal to a value from the Dictionary, the correspondent Value should be given to me.

I’m stuck on extracting the value in the If condition:

Any tip?

1 Like

@samureira
Give a try on yourdictvar(“YourKey”) for retrieval the value of a dict Item for the particular Key

3 Likes

@samureira
You can use the key exists activity to check if a given key is present in the dictionary or not.

1 Like

solved with GenericDictionaryName(item.ToString)

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.