How to assign array variable in external config file into array variable on UiPath Studio?


#1

Hi,

Now I’m working on the RPA development and I encounter the problem.
I use the external config file(excel) and the config information will be imported into dictionary<string, object> variable(Variable name:Config) once the robot started. e.g (Name:FILEPATH, Value: temp\test.txt)

If the variable is string then I can use in_Config(“Variable Name”).Tostring method.
However if it is array variable, how can I handle it?

Best Regards,
Takuya


#2

Hi Takuya,

An example would be helpful but you could use a string with delimiters and split it into an array once imported.

Regards
Troy


#3

Hi Troy,

Could you kindly give me example?


#4

Does this help?


#5

Thank you so much.
You’re right. I have same issue but I would like to know the way without using Jason file.

How to convert object variable to array variable?

Best Regards,
Takuya


#6

Hi @11115,

Try this way

you can create in config like this For example arravalue: value1,value2,value3

arr=dict("arravalue").ToString.splt(","c)

Regards,
Arivu


#7

And an example of the split previously mentioned by @tmays and @arivu96:
Dictionary Array.zip (7.6 KB)


#8

Hi Arivu,

Thank you for your advise.
This works well.