Now, some of the contents on the first column need to be replaced just for the value in the sencond column. No problem with that. The issue appears when I’m trying to use the content on the second column as name of a variable.
Is there a way in VB.NET to get a variable’s value using the variable’s name as string?
I would need something like:
GetValue(“variableName”)
Or else, is there a way of putting all the variables in UiPath in to a dictionary?
If you use the RE Framework to create your process it comes with a config file which does just that.
You enter a string value as the variable title and the content is picked up as an object. All variables in the config file are stored in a dictionary (string, object) variable for use throughout your process
Sure, you can use a dictionary, like above poster mentioned. But, I’m not sure that’s what you need, since you need to use the value as the variable.
One method I use a lot is String.Format().
For example, instead of str_NotAttachement use {0}
Then, in your code use String.Format(dict("mvar2").ToString, str_NotAttachement)
—that will place the variable str_NotAttachement into the value where you have {0}. You can have as many parameters too so use {0},{1}, and so on