How to get the correct row index and update it with some info

Dear all,


i will need to run the process to check on the “DAILY REQUEST STATUS” row which is still dont have “SENT”.

and proceed to send email for each of the row that meet the condition.

But the row sequence is not in order , it may skip one row especially for revision case.


How can i get the correct row index and update the status to be " SENT" if there is no error pop up?

Kindly advise.

Hope above clarifies.

Hi @irene0227

Please try this,

  1. Read you excel data in store in a datatable (variable name dtTable).

  2. In assign activity,
    dtTable="[DAILY REQUEST STATUS] <> ‘SENT’ ").copytodatatable

  3. Use for each row activity and loop through the data and update the data as required.



Thanks for your reply.

What i did is as per below:

  1. Assign original data table to be InputDT
  2. Use filter data table to remove for those processed data (which "DAILY REQUEST STATUS = “SENT”)
  3. Use for each row to loop through filterDT
  4. send outlook mail message
  5. use if activity ,
    Condition: String.IsNullOrEmpty(row(“DAILY REQUEST STATUS”).ToString)
  6. Get the row index
  7. Write range activity to update for row" DAILY REQUEST STATUS" to be SENT
    after email sent out successfully.

my problem is i cant get the correct row index to be update on it.

Do you understand what i meant?

@irene0227 please tell if I understand correctly you want to send emails and update the excel where the DAILY REQUEST STATUS is empty.

Please try this

  1. Read the excel and Store in datatable.

  2. Use for each loop and Inside use if condition string.isnullorempty(row(“DAILY REQUEST STATUS”). tostring)

3.In then part send an email.
Update the row by using assign activity row(“DAILY REQUEST STATUS”) = “SENT”

  1. Use write range activity and write your datatable.

Filter datatable is not required



Hi, sorry for the late reply.

i have design the workflow follow your suggestion and it works.

thanks a lot.

1 Like

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