Compare Transaction item Value to Datatable Row Value in REF

Hello all,

I’m getting using my transaction data using In_transactionItem E.G -in_transactionitem(“Part No”).ToString (using datarow based RE framework).I need to compare with datatable row variable EG - RowDt(“Part No”).ToString from a different excel. as well as the date column RowDt(“Date”).ToString to previous day value.

I’m using condition
if: in_transactionitem(“Part No”).ToString.equals (RowDt(“Part No”).ToString) And now.AddDays(-1).ToString(“MM/dd/yyyy”).equals (RowDt(“Date”).ToString)

But the condition is not being met despite assuring that the right values are taken via Locals Panel.

Kindly please help if you can provide how to make the right comparison.
Thank You.

Hi @Yugal_Raju ,

if passable share workflow screenshot

Thanks,

Hello @Yugal_Raju ,

Add breakpoints and verify if the RowDt(“Date”).ToString is coming in the required format and also verify the other values as well.

Also try the below and let me know the result :

in_transactionitem(“Part No”).ToString.equals (RowDt(“Part No”).ToString) And now.AddDays(-1).ToString(“MM/dd/yyyy”).equals (Convert.ToDateTime(RowDt(“Date”).ToString,DateFormat,System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yyyy”))

Note : Here replace DateFormat with the format that you receive in your input (Ex : dd-MM-yyyy)

Regards,
Rohith

Hello, @Yugal_Raju - Can you check the below points

→ Keep message boxes before the condition and try to print RowDt(“Date”).ToString, RowDt(“Part No”).ToString and see what it is giving
→ Instead of giving column names try giving the column index of data row variable

Share your observations

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.