I want to put “a”, “b”, “c” to a Array of string D, the result is D={“a”, “b”, “c”}, I set the D=string, and used “assign” and loop to put the string, but I failed. So which activity should i use?
I want to check if the D={“a”,“b”,“c"} includes the “a”, which function should I use?
Sorry for I’m new beginner, thanks very much in advance !
Array is a collection where the size is predefined.
If you want an array of three string elements you can use arr = {"var1","var2","var3"}
You can assign values only to these three elements using Assign activity, like Assign arr(0) = "New Var"
which would make the array as {"New Var","var2","var3"}
On the other hand if you want to use a collection to keep adding elements to it, use List collection.
This thread might help you get a better understanding
You can do this -
simply using D.contains("a") within an If activity