Error while assigning values to array in assign activity

Hi Friends,

Good Day!

i am trying to assign the value to array and got error at run time please refer below error screen shot and advise me.

error Message :- Main.xaml: Cannot assign from type ‘System.String[]’ to type ‘System.String’ in Assign activity ‘Assign’.

Image

1 Like

Please check the datatype of arrStringNameAge, it should be system.string[] --> try this.

Can you share your xaml for further assistance.

Thanks!

3 Likes

Hi Friend,

Thanks for you’r prompt help
Am sorry am new to UIPATH and still am in learning stage, please suggest me how to change system.string[] and attached xaml file for you’r reference

Main.xlsx (7.7 KB)

1 Like

Hi @Dhanraj_Guduru,.

File is invalid. unable to open. And also, im seeing the ext as .xlsx please check the file and upload correctly. Mention uipath studio version also.

Thanks!

2 Likes

click on Variable type ;
image
click on “array of T”
image
SELECT “string”
image

3 Likes

Set arrStringNameAge as Array of String
1 Assign (Assign)
To = arrStringNameAge
Value = { strFirstName , strLastName , strAge }
Private = False

1 Like

2 Likes

Thanks for you’r help ! !! issue has fixed

1 Like

Hi Anna,

Thanks for detail explanation, really which helped me to fix the issue :slight_smile:

1 Like

thanks for you’r help

1 Like

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