Collection was of a fixed size

Hi Team

In My code I have a uploadList variable of type List. I have initialized it like shown below

image

After this , I am trying to use “Add to Collection”, I am getting error - Collection was of fixed size.

Argument Declaration:

image

Could you please help me to resolve this issue?

1 Like

@Deeipauk,

Please have a look at below Screenshots.

  1. Variable Pane : Where Listof Strig is Declared.

  2. For Each string Item - I am adding them to List.
    image


Mukesh

Hi ,
i am trying to add an item (abc) in collection variable(ArrCollection), but it is returning error as mentioned in this thread.
please refer below screenshot and explain the issue

@vigneshnkv change ur variable type array to list of string. You cannot assign values into array like this

4 Likes

How do you make a variable of type List (String)?

Hi @spk2dc

→ You can create a list in the below way to assign a list.

Str_list= New List(OfString)

Str_list id is of DataType System.Collections.Generic.List(Of String)
To add items to the list you can use Append Items to collections activity to add items to the list.

→ If you want to add items to the list you can do the below way by taking it in assign activity. The below syntax will initialise a new list add item1,item2,item3 to the list.

Str_list= New List(Of String) From {"item1","item2","item3"}

Str_list id is of DataType System.Collections.Generic.List(Of String)

You can refer the below video also

Hope you understand!!
Regards