I’m having a problem with an If statement condition within a For Each row activity, where the condition in the If statement is not being recognized when true, causing all rows to go into the ‘Else’ instead of the ‘Then’. I’ll explain below in further detail.
My automation is within a 1SAP transaction, with the part not working correctly being where I extract a structured data table of payments from a SAP screen. This data table is then filtered to remove invalid valid payments leaving only those that are valid, “dt_ValidPayments”. The For Each row loop is then supposed to iterate through each payment row and perform a validation check on specific columns to ensure they are in the required values/format, with any rows not meeting the condition requirements being added to a new data table, “out_dt_PaymentAnomalies”.
When I perform this part of the automation though the rows that satisfy the condition are not recognized as such and so the entire dt_ValidPayments data table is added to the out_dt_PaymentAnomalies data table. When looking in debug i can see that the data table has been extracted correctly and the row is recognized, but when looking at for example “row(3).ToString” in Immediate, that also appears with a compiler error.
Refer below for screenshots of the condition and the context of the activity. Any help with why this is occurring would be greatly appreciated.