If condition - add to collection another row

Hello every one,

I’m trying to do something and i’m struggling.

I try to do that :

If
Condition : Correct (Correct is a variable on a previous assign but anyway)

Add to collection
I would like to put in the collection a previous row and i know his index

Anyone can help me please ? Thank you ! :slight_smile:

Fine
Previous row means would like to insert a Datarow
Kindly elaborate the scenario a bit more pls
Cheers @BaptisteC

1 Like

Thank you for your reply @Palaniyappan,

I explain you,

I’m working in a data table. I put a for each activity and a several condition.

The first If is to know the row which contain a specify substring and i put his index as variable.

Second if, if row(“Column3”) contain a specify substring and row(“Column3”)(index +1) with same Substring <> row(“Column3”).contain(“String”) i put an assign “Correct”

Third if, if correct, add to a collection the row with the index found in the first if.

Feel free to ask me if you want more. Thank you for your help

If we have stored that index in a int32 variable then we can add that to items property in ADD TO COLLECTION like this variablename-1 and also the collection property with the list or array variable name you have

Make sure that type argument property is set as int32

Cheers @BaptisteC

1 Like

For my information, why you put “-1” ?

I have another request, if i want to remove a specify item in a collection. I know that i can use Remove From Collection but i don’t know how it works…

I specify like that : “F0,B7,1000 140819FRT3ORDLIV”

Can you help me ?

Hello ,

My scenario is also similae ,I want to add one more condition in if statement that should parse to ‘Add to collection’ field.In that 'Partnames are given as Add to collection field.
kindly help me out.

Hi @Priyanka_Sorate

Can u explain your query well so that I can help

Regards

Nived N :robot:

Hello Nived,

Actually I want to pass one more argument in if condition similar to like that in_ArgpreviousRevision.This comes to Add to ollection field.It fethes previous revision .I want to fetch previous revision and after that is should fetch new revision .I have attached snippts .Check this .

Regards,
Priyanka