Declare and initialize the array in Uipath dynamically

Hi ,
I need to initialize the array where the number of items in array is dynamic i.e. i get the array count only when i execute the workflow.
currently i’m initializing like this {“”,“”,“”,“”,“”,“”,“”}.Can anyone suggest me the right way to initialize the array.

Hi,
If the size of an array is unknown, it is better to use a list instead of an array. Initialize the list and add the items to it using the activity ‘Add to collection’.

1 Like

Here is a detailed article on that :slight_smile:

Regards,