How to store string values in array using input dialogue in while loop

Hello ,

I am trying to store string values in array using input dialogue in while loop till user numbers of times.in while loop i am assigning values using assing activity, as below
anarray(Counter)= value(String variable)

However getting error as Message :Object reference not set to an instance of object.

I am beginner for UIPath, Please check and suggest.

If you don’t know how many items to expect, List objects can be a better choice. You can always convert a list to an array, and vice-versa. The null reference exception occurs when you declare a variable without initializing it. Note that my example explicitly says, New List(Of String) - so items is declared and initialized.

1 Like