Read each row for changing the status

Hi,
I have an excel
doubt
I need to assign the shipment address for each completed status in shipment status. But one by one at first run if i have any address that is to added i should check for completed condition and add only to the first one not to all. I tried in for each activity but for one run it replace one address to all the completed status. how to avoid this

Can you explain a bit more ?

1 Like

Thanks for your reply…
This is my first sheet.


When the status has been updated as Payment is success i need to pick up the address of that field and update in the second sheet given below
doubt
In second sheet i should append the address in shipment address if the shipment status is in complete.
At first run it takes the first payment success status and pick the address and it should assign only to the first shipment status complete not to all.

@soumi_soumiya
you can use lookup datatable activity for this…
image

it will give you the index value for address…

1 Like

Does both sheet have a unique reference number to map?

Thank you…
Can u be more clear. I cant get your where to use this activity

Thanks for your reply…
No

Your are getting address if the status is “Payment Success” from first sheet1. In case you have two “Payment Success” rows (1st screenshot). Then how you will decide to which row in sheet2 it should write the address?

After getting address form sheet1…use read range activity and read sheet2 and save output as dt…then use lookup datatable activity…
and give properties as shown in image…
image
After that assign…idx=idx+2…
Then use write cell activity…
image
In write cell…give your AddressVar and index as…“F”+idx.tostring

thanks for your reply…
thats what i am asking

Thanks for your reply…
What does F does is it a new variable

image

1 Like

Monika thanks for your reply…
As you said it works but still i am facing an problem.
kk
I have tow ready state once the address get filled at first ready state for second address it should go for the second one but i get overwrite. how to do this

@soumi_soumiya
istead of lookup datatable …read your sheet2 using read range and save op as dt…after that use for each row and give dt as input…
In for each row use if condition…
row(“Shipment Status”).ToString.Contains(“Completed”)
In Then part assign…
row(“Shipment Address”)=AddressVar
After that use write range activity and write sheet2…and pass dt as datatable.

1 Like

Hi Greetings!

Can you give me sample input files in two sheets and expected output in one sheet.

I will try to achieve it.

Thanks!

Thanks for your reply…
I had done but i am not getting what i need it writes for all the cell that contains completed