Greetings,
As title above, how do I write in IF else statement expression (IF excel row(24) is empty → stop process). I also apply “Stop Job” activities but I don’t know how to make it function. Appreciate the solution and guidance.
Greetings,
As title above, how do I write in IF else statement expression (IF excel row(24) is empty → stop process). I also apply “Stop Job” activities but I don’t know how to make it function. Appreciate the solution and guidance.
Hey @DTECH
In the If statement pass the below condition,
String.IsNullOrEmpty(String.Join(String.Empty,dt_Excel.Rows(24).ItemArray).Trim)
If the above is true
, then the row is empty.
Thanks
#nK
Hi,
If you can accept ungraceful terminate, TerminateWorkflow activity helps you.
Condition will be
row(24) is Nothing OrElse String.IsNullOrEmpty(row(24).ToString)
Regards,
Hi,
Do you mean the following IF?
If so, can you try to remove “dateTableT1 =” at the beginning of the condition?
Regards,
Sorry it was wrong file with same name, apologies. Im sending the correct one.
Flowchart.xaml (10.5 KB)
Hi,
Can you also share excel fiel : test4.xlsx ?
Regards,
Hi,
It’s because the datatable is empty and activity in the for each row won’t execute. (There is no row to iterate)
Regards,
I see, is there any other solution ? Because Im trying to make IF datatable is empty → Stop process, Else → start key-in/type into
Hi,
Can you try the following expression?
gotah2 is Nothing OrElse gotah2.Rows.Count=0
Regards,
Still Else output which is “N” instead of “Stop Process”.
Realized still putting inside for each row. Now it works. Appreciate and thanks a lot Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.