I want to start a flow depending on a Date and Time column within a SharePoint List.
I guess first step would be to configure a recurrence e.g. on a daily base.
Now Flow should check if the date within that column is today or if the date is already in the past.
In both cases flow should trigger some actions.
How can I do that?
OK, You can trigger a flow when an SP list item is created or modififed. I would then use a condition based on the date to manage the next steps. What do what to achieve?
What I want to have is that the workflow starts every day on a list.
The workflow should check a date and time column within that list. If the date is today or in the past, something should happen.
How do I add "today"?
I would use the trigger 'Schedule' and run it a time in the day that suits. Then I would likely use the action on SharePoint 'Get Items' In the filter iw ould put something like:
Date le 'utcNow()'
date equals your datefield so change name as necessary
This would return all records less than or equal to today if utcNow() is in today's date. you may need to either:
1. Run the flow as per a schedule that guarantees that utcNow() is in your local time or
2. You can change utcNow by adding hours to match your time zone EG" addHours(utcNow(),10) would equal my zone time which is Brisbane Australia. So say I set the schedula to run in my time zone at 3am, I would then use addHours(utcNow(),7) as I am already three hours nto the day.
Hope this all made sense
Thanks for your reply!
Maybe I need to explain my usecase a little further:
I have an onboarding list. Within this list I have the first day of work for every new employee.
Based on that date a have some other calculated columns:
(first day) minus 4 weeks
(first day) minus 3 weeks
(first day) minus 2 weeks
Why? Because there should be some actions 4 weeks before working starts, 3 weeks before working starts, etc.
Additionally I have some yes/no colums (indicating if the workflow that distributes all the tasks for that period has already started):
YN-4w = no
YN-3w = no
YN-2w = no
What I want to achieve is, that every day the workflow starts, checks if for example YN-4w is "no" and if the calculated value for column "minus 4 weeks" is already reached or in the past.
If so, some actions should be triggered.
How can I build something like this?
BTW: is it possible to start a flow out of a flow?
calculated columns will not appear as a dynamic option for a Flow to choose. You can overcome this by creating a simple field that enters the date when the record is first created. But if the master date changes then this would not update.
You should be able to achieve what you want with out calc columns. I would look at one flow like:
Assumes first day is the key date field
1. Trigger is a schedule
2. First action is a get items base on your list with a filter like: first_x0020_day eq 'addDays(utcNow(),-28)' - Note: This formula is built in the expression box. Also note _x0020_ is the characters to put in of your column name has a space.
3. Add a compose with expression length(body('Get_items')?['value']). Note: this is built in the expression builder.
4. Step 3 creates a result of number of records found.
5. Add a condition that evalutes Step 3 result is greater than 0
6. If yes - do something - if no do nothing??
7. After the condition repeat the whole thing for your your other processes
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
Find your favorite faces from the community presenting at the Power Platform Community Conference!