Add static values to dictionary by using add dictionary activity

Hello all,
here i have 30 values which are static
ex: code value
01 Mp
02 Up
03 Ap

etc

the question is that i want to enter the value based on code which is in excel, code will change for every record based on that i want enter value can anyone please assist me awaiting reply.

thank you.

Read the excel data into Data Table and use For each Activity to loop
Use “Add to Dictionary” activity to add the Key and value in the Dictionary.

For Each row in DT

code = row(0).ToString
value = row(1).ToString

image

In the Add to Dictionary,

In the key , enter code
In the Value, enter value

1 Like

Looking at you scenario you should use a config file and fetch the code from there.

Because if some code needs to be changed you can change that in Config file and you code will not get affected.

Thanks,
Prankur

1 Like

hello @KarthikByggari here can i add statically because it won’t change key and values.
once i added to dictionary how can i use dinamically

hai @PrankurJoshi in my case it won’t change