Create a array in if items are ture


how to create a list if input strings are ture

1 Like

Hey @Tharusha_Fernando,

Create a array variable in variable pane and initialize it with fixed size

If you don’t want a fixed size then go with List data type.

Inside IF use Add to collection activity and pass your array variable in collection & the string to add.

Thanks
Nithin

2 Likes

hey @Tharusha_Fernando

first declare a list variable
if condition true:
use add to collection activity to add item in list

1 Like

can any of you script the code @Nithinkrishna @nv08

1 Like

Hey @Tharusha_Fernando

PFB

Thanks
Nithin

1 Like

where does the “item” come from

1 Like

That’s just a constant string I added, you can use your for-each item over there…

1 Like

Sequence2.xaml (4.9 KB)
hey @Tharusha_Fernando
Kindly check this one if it is useful for you

1 Like

@nv08 @Nithinkrishna i trying to do if i have several email address i wanna run in a for each look and check for a condtion if condition id true add that email address

at the end it shoud be like {“dam@gmail.com,"dam@gmail.com"}

Sequence2.xaml (4.9 KB)
check if it match your needs.

1 Like

hy @nv08
is their a way keep on adding variables one at a time
for each

round 1 = {“dam@gmail.com”}
round 2 = {“dam@gmail.com,"dam@gmail.com" )
round 3 ={“dam@gmail.com,"dam@gmail.com","dam@gmail.com"}

Hey @Tharusha_Fernando
Use this workflow
In add to collection:
Collection: your list variable
Item: item.toString()
Kindly use these properties to add one by one.

hi @nv08

let me try
Thank you

dude, you have to declare the list variable first and send your list of string in add collection you need to give the variable what you create @Nithinkrishna explain that properly you just look at that and follow it.