In SAP I have the Table (matrix) which columns (picture attached)
I used DataScraping and store the whole matrix in DataTable.
I need to look at the Column “Status” and find the first row where I have one of the following number:
and store this number in a variable
I recommend using a ‘for each’ activity to determine if the numbers you are checking for are present. Since you have the data stored as a DataTable you can use a for each activity that examines each row in column “Status”. Then, use an ‘If’ decision along with an ‘Assign’ activity to assign the variable to number if it exists in the column.
Can you use the Export to save the table to a file (I think Export would be in the top Menu bar where File is)? If so, you can use the data table to find the row items, and click/select them in SAP
and yeah, run it through a For each like TomG mentioned.
You can then check if the status contains one of the numbers by using .Any() I think.
Assuming your numbers are in a list or array (or split from a text file like text.Split(vblf(0)) )
For each row In dt1
If numberList.Any(Function(x) row("Status").ToString.Contains(x.Trim) )
dt1.AsEnumerable.Where(Function(row) numberList.Any(Function(x) row("Status").ToString.Contains(x.Trim) ).ToArray
which gives you an array then use a ForEach on that to process each row that contains the numbers.
Use if condition to check the value exists in the column
If return true → value exists
If return false-> that value not present in the column.