Last row of each PO in excel

Hello all,

I For Each Row in Data Table & type each row from excel and save when each PO done
Ex: I have PO: POR-20230202-001 with 3row, how I know to save when PO-001 done ?

image

Hi @anh.nguyen ,

One approach possible is to save the last value of the current PO into a variable and then compare it with the new PO value. If both PO is the same then the line is for the same PO.

Hope this helps. Happy Automation!

Kind regards,
Kenneth

1 Like

HI @anh.nguyen

Before for each

  • Assign POvar = “PONumber or any string”

Inside for each row

  • If Condition CurrentRow(“PO”).ToString.equals(POvar)
  • after all the steps use a assign activity at the end save the current po to that variable
    like POvar = CurrentRow(“PO”).ToString

Regards
Sudharsan

1 Like

I did it at the beginning to it not repeat PO and only type G & H col. But how when come the last PO-001 it can save?

hi @anh.nguyen

You can try this:

Hope this helps. Happy automation!

Kind regards,
Kenneth

1 Like