How can we use multiple string values for the same field in UiPath using a config file?

Hi Everyone,

Can someone explain how to use multiple string values for the same field? I created an array-type variable to store the values, but when I try to use it inside a ‘For Each’ loop, I get an error saying that it can’t be used because it is a DataTable, and the values are stored as a string array. Could you provide a solution for this?

Thank You !

Regards,
Preety

Hi @Preety_Choudhary

You have multiple values for a single key and it might be seperated with any symbol let’s say comma.

If i am right, Then give the expression for the assign activity as below,

- Assign -> Arrvar = Config("key name").toString.Split(",") 

then use for each activity to iterate the each values in the Array variable.

You might be using for each row in datatable activity instead of using for each activity or your variable datatype is in datatable change the datatype to array of string.

Hope it helps!!

Hello @Preety_Choudhary

Try to change the Type to String, please check the below image

Hi @mkankatala,

Yes, it worked.

Thank you very much !!

Happy Automation

1 Like

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