Issue with reading dictionary value


I’m having some trouble with a piece of code that I’m working on. I’m trying to read a value from a dictionary that was passed as an argument from another workflow. However, when I run the code, I am getting an error message. But the program is running in debugging mode without any issues.

Can someone help me figure out what is wrong? Also please tell me if there is any better way to read the config file. (109.6 KB)

Hi @anlinalbert ,

Could you maybe try assigning the Expression in a Separate Assign activity and not with Multi Assign ? We could better target the error with the error message the separate Assign activity receives and correct it accordingly.

After separating it, I am getting the following error.


@anlinalbert ,

Could you try adding a slight modification to your GetConfig workflow ?

The Assign statement updated as follows :

Config_dic[CurrentRow.ByField["Name"].ToString()] = CurrentRow.ByField["Value"]


I believe the .ToString() was missing and hence it was throwing an error, However the error is a bit off from the type error that it should receive.

Let us know if it does not work even after the change.

No, that isn’t working. Still the same error.

Hi @anlinalbert ,

Could you check the updated workflow below : (18.7 KB)

I had updated the dependencies to the latest stable versions and corrected a few compiler errors after and when tested it did work fine and did not threw error in the Assign part.

Maybe mostly because of the Preview versions being used, the error or bug was observed.

Let us know if you were able to make it work with the updated workflow.

It worked :smile:. Thanks for updating the dependencies.

1 Like

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