Looping the workflow

Hi Friends,

I am very new with UIpath, Can anyone teach me how can I make the same workflow to run 3 times without manually click run every time?

Hi @pingggggg,

You can use While or Do While Activity for that. If you want to invoke workflow inside while loop try using Invoke Workflow File Activity.

While: The While Activity

Do While: The Do While Activity

How to use Invoke Workflow File Activity: Using Arguments

Hi,

As i am running to extract email. i already got the backbone out for 1 day for example 18 sep. But i need it to extract mail from 16 and 17 too. Total 3 days.

How can I do that?

“[Received] >= '”+FileDate+" 00:00’ AND [Received] <= ‘“+FileDate+” 23:59’" I wrote this to specify the date. for filtering string

You can store this dates in array and use them in loop. Using Invoke Workflow File you can pass these dates as Arguments. Other method that you can use is using For Each Activity. Just make array with dates and use it in for each loop

Hi,

But the date will not always be the same… Is ui path able to specify day? like saturday sunday Mon tgt with the dates

Hi,

You can use custom date format to get day of week: Custom date and time format strings | Microsoft Learn. To get current date you can use DateTime.Now property

Thank you(: