How to add to a array and not to overwrite


i have a (empty) array and want to add some strings to it but i keep overwriting and just have one item in the array

How should it be done?

Hi there @nicostegeman,
If you require a dynamic array, I would recommend simply using a List (Of String).

You should be able to declare the list and add to it via the Add To Collection activity.

Thanks in advance,

Hello @Mr_JDavey

Thanks for the quick answer.
i am trying to merge some pdf files. And for the pdf merge activity i need a array i think

see file:

Uipath binders maken facturen (test2).xaml (44.3 KB)

Hi there @nicostegeman,
In that circumstance, you could utilise a List, as noted, but then convert to an Array, when required.

You can achieve this via:

Please see the below:

Alternatively, in case you cannot access the dotnetfiddle:

Dim lsExample As New System.Collections.Generic.List(Of String)
lsExample.Add("Something Else")
Dim arrExample = lsExample.ToArray
For Each index in arrExample

Thanks once again,

1 Like

Thanks Josh

for the solution
i have been able to do this in a simple workflow.

Now i am going to use this in the workflow i was working on.

Thanks once again,


1 Like