How To compare expected and actual value and Update status

Hi Everyone,
Could anyone help here:
How to compare expected value and Actual Value and update status by automation

In If Condition (Given Syntax)-- CurrentRow.Item(“ActualAmountPayable”).ToString=CurrentRow.Item(“ActualAmountPayablePQM”).ToString


image

@Saajan_Venkatraman

can you tell where you are facing issue

try the below expression

inside for each row in datatable activity

condition as

CurrentRow(“ActualAmountPayable”).Tostring=CurrentRow(“ActualAmountPayablePQM”).ToString

or

CurrentRow(“ActualAmountPayable”).ToString.equals(CurrentRow.Item(“ActualAmountPayablePQM”).ToString)

cheers

Hi @Saajan_Venkatraman

You can try like this

CurrentRow("ActualAmountPayable").ToString.Trim.Equals(CurrentRow("ActualAmountPayablePQM").ToString.Trim)

Hope this helps!!

Hi @Saajan_Venkatraman

Can you try with this expression

  1. Use For each Row in data Table activity

  2. Use If activity

CurrentRow(“ActualAmountPayable”).ToString.Trim.Equals(CurrentRow(“ActualAmountPayablePQM”).ToString.Trim)

Then Side → You can use Write cell activity to update the status (Success)
Else Side → You can use Write cell activity to update the status (Failed)

Hii @Saajan_Venkatraman

Use activities to get the expected value and store it in a variable (expectedValue).

Use activities to get the actual value and store it in a variable (actualValue).

Add an If activity to compare the values:

  • Condition: expectedValue = actualValue

In the ‘Then’ branch, use activities to update the status(Write pass to a field)

In the “Else” branch, use activities to update the status(Write fail to a field)