Store more then one value in a string variable

I run a proces - 1st time when i run…

Argument variable
in_TestVariable1 (type - string) have value (Test 1)

When i run same proces again the same variable (in_TestVariable1) get a new value (Test 3)
and run again the same proces and it get a new value (Test 4)
Now i continue the proces and check the value of variable (in_TestVariable1)…

and its giving me last value Test4 but I expect it has all 3 values…

I’m trying to convert that string variable to string of array but its says its not possible.

MyVariableArray (type → system.string) = in_TestVariable1

not working… can someone help?

Hi @Latif
It is possible that you’re trying to change the datatype to String (array) from the ‘Import Arguments’ button. The argument’s datatype can only be changed from the actual workflow file, not the calling instance.

Can you try changing the datatype in the workflow file, save the file and then click ‘Import Arguments’ from the calling file again?
Otherwise, if I got your question wrong, can you maybe share a screenshot of where exactly do you have the issue?


variable TestVariable1 is filled with values from the uipath form when it runs…

then i create a new argument in_TestVariable1 with type string as out direction to use in other flows…

so i run 3 times I want to convert this in_TestVariable1 into array… så that it hold all 3 or 4 how many time uipath forms flow run.

I also use a countFormRunTime = 0 when it run one time but increte into number when it run more then one time…

Uipath forms run 1 time…
countFormRunTime = 0
TestVariable1 = Test 1
in_TestVariable1 = Test 1
but when user answer YES that it want to run more then 1 time same uipath forms flow…
Uipath forms run 2 time…
countFormRunTime = 1
TestVariable1 = Test 3
in_TestVariable1 = Test 3
user chose again to run again…
Uipath forms run 3 time…
countFormRunTime = 2
in_TestVariable1 = Test 4
and it can go on an on…

But I want when uipath forms run count is >0 = it put all the value into array …
assign MyVariableArray = in_TestVariable1 (Test 1, Test 3, Test 4)

Going by my (albeit limited) experience with UiPath Forms, I reckon the flow won’t let you render the same form repeatedly unless you bring data back into the flow.
When you do, based on the user choice whether to submit another entry, you can run a Do-While loop, such as
→ Create Form
→ If UserChoice = "YES"
→ → TestVariableList.Add(Test <counter>)
→ UserChoice = "YES"

An array won’t serve your purpose here because it needs to be declared with a finite size. You can use List to achieve this outcome.