Else if cases

I have given status variable as completed in build data table to write in excel but in else part i want to write not completed in excel in satutus column how i can give this?

Hi you can achive this using

else part

use assign
row(“ROWNAME”).tostrting = “Not Completed”


what variable i can give in assign

@Kuldeep_Pandey In assign
Row(“status”)=“Not completed”

Its notwriting anything in status column

row("status”).tostring = “Not Completed”

make sure your for each using row/item/current row
then adjust it


This is my flow i have give this above my else if activity now i have to change my status in else part so your above expresiion is not working if i run i is taking completed in else part

Please check

Do u know whats the problem

Hello @Kuldeep_Pandey
Since You’re about to write into a Excel sheet, I prefer you to go with write cell activity inside a if activity. To do that u can retrieve the excel data table or your variable. And also create a row count variable to go with the each excel row to update your status. check the attached simple workflow.
With a for each row activity you can check every item in your in built database and update the status one by one. Hope this will Help

Write in exccel IF.zip (132.8 KB)

If you planing to update in your data table and write the whole table in to a excel sheet you can put a update query instead of write cell activity
Best Regards.

We have to run bot many time and append data inti the same file so i think count will not work here

1 Like

@Kuldeep_Pandey Do you want to update data table and the excel same time?? Can you explain little bit details about your process scenario.

If you have a data table to update as i mentioned you can go with a update query since it’s in a for each activity process will run one by one to update the data table or the excel.

Hi @Kuldeep_Pandey

After add data row are you trying to give a if condition and change the status vale?

If yes then

Dt.rows(dt.rowcount-1) = “in complete” inside your if condition will change it

Let me know if that is not the case.more details would help


1 Like

Dt.rows(dt.rowcount-1) = “in complete”
Where i have to give this?

1 Like


After adding the row add a if condition and add the condition that you want to check.

then inside that add this assign to change if the condition is satisified


1 Like