I’ve got a datatable with hundreds of ID numbers(42343248,823434 etc) in a for each row loop.
Each row is assigned a ID variable(Pref1) Then I’ve got a datatable DT1 which has 16 rows of ID numbers. I want the IF activity to check the current Pref1 variable against the 16 in DT1, and there is matches go the ELSE path.
Right now i’ve solved it by simply putting all the individual IDs in the IF(IF pref1=“43434” or if pref1 =“534” etc etc. But its so messy.See attached image.
Is there a way write the IF different so that it checks each row in DT1 at once, without having to specify each ID like im doing now?
Create a variable of array of String, set it default value to {“42343248”, “823434”, etc}
Then you can write the IF source as SQLPNR = “” OrElse array.contains(pref1)