Solved! Go to Solution.
Hi @Oskarkuus ,
Do you want to achieve your needs in PowerApps or Microsoft Flow?
Do you want to get all dates within a date range?
Based on the needs that you mentioned, I think there is no direct way to achieve your needs in PowerApps or MS Flow. I agree with your thought almost, you could consider make an calculation and extract each date within a date range, then store them in a list, let your flow trigger on these.
I assume that you ask the end users to submit a Vacation Request using your app, then specify a date range for vacation. I have made a test on my side, please take a try with the following workaround:
My SP list data structure as below:
Note: The Date column is a Date type column, which used to store the individual extractd date.
My App's configuration as below:
Set the OnSelect property of the "Submit" button to following:
ForAll( AddColumns( FirstN( [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31], DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1), "Day", "Day " & (Value + 1), "Date", DateAdd(DatePicker1.SelectedDate, Value, Days) ), Patch( '20190415_case4', Defaults('20190415_case4'), { Title: "Vacatio Requst", Date: Date } ) )
On your side, you should type:
ForAll( AddColumns( FirstN( [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29], DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1), "Day", "Day " & (Value + 1), "Date", DateAdd(DatePicker1.SelectedDate, Value, Days) ), Patch( 'YourSPList', Defaults('YourSPList'), { Title: "Vacatio Requst", DateColumn: Date } ) )
Note: The DataPicker1 used to choose a Start Date, DatePicker2 used to choose a End Date.
More details about ForAll and Patch function, please check the following article:
ForAll function, Patch function
My flow's configuration as below:
Within the "Delay Until" action, set the Timestamp field set to following:
concat(triggerBody()?['Date'],'T09:00Z') /* <-- Date represents the Date column in my SP list */
On your side, you should type:
concat(triggerBody()?['YourDateColumn'],'T09:00Z')
then the "Delay Until" action would be executed at specific individual date.
Please take a try with above solution, then check if the issue is solved.
More details about extracting each date within a date range, please check and see if the response within the following thread would help in your scenario:
Best regards,
You can follow below steps to solve your issue.
- Create a NextCreationDate set to startdate in list
-
- Create a recurrence flow runs on daily
- Initialize a local variable - varNextDay
- find the record which is having the current date =NextCreationDate and less than or equal to enddate
-if YES, then send the reminder and adddays in varNextDays - like -
Heya,
I think you should look at this a different way - instead of collecting the dates, you already have the start and end dates so...
I've not implemented anything specifically like this, but I think since you have the StartDate and EndDate, you could create a flow that runs daily starting with the Recurrence connector and could then specify which time to run it as well if you want the report going out at a specific time:
Then pull all items in the list that are not closed (assuming you have a closed or similar field), then do a For Each, then use a Condition to check if Today() => StartDate and <= EndDate - if yes then send reminder
Again, you'd need to flesh-out the details, but the concept is solid and I've done similar things using recurrence and Conditional checks of a field within each item within a list.
There's a forum specifically dedicated to Flow within the PowerPlatform forums so you'd probably get more specific answers there if the above isn't enough for you to go on 🙂
Cheers,
ManCat
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @Oskarkuus ,
Do you want to achieve your needs in PowerApps or Microsoft Flow?
Do you want to get all dates within a date range?
Based on the needs that you mentioned, I think there is no direct way to achieve your needs in PowerApps or MS Flow. I agree with your thought almost, you could consider make an calculation and extract each date within a date range, then store them in a list, let your flow trigger on these.
I assume that you ask the end users to submit a Vacation Request using your app, then specify a date range for vacation. I have made a test on my side, please take a try with the following workaround:
My SP list data structure as below:
Note: The Date column is a Date type column, which used to store the individual extractd date.
My App's configuration as below:
Set the OnSelect property of the "Submit" button to following:
ForAll( AddColumns( FirstN( [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31], DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1), "Day", "Day " & (Value + 1), "Date", DateAdd(DatePicker1.SelectedDate, Value, Days) ), Patch( '20190415_case4', Defaults('20190415_case4'), { Title: "Vacatio Requst", Date: Date } ) )
On your side, you should type:
ForAll( AddColumns( FirstN( [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29], DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1), "Day", "Day " & (Value + 1), "Date", DateAdd(DatePicker1.SelectedDate, Value, Days) ), Patch( 'YourSPList', Defaults('YourSPList'), { Title: "Vacatio Requst", DateColumn: Date } ) )
Note: The DataPicker1 used to choose a Start Date, DatePicker2 used to choose a End Date.
More details about ForAll and Patch function, please check the following article:
ForAll function, Patch function
My flow's configuration as below:
Within the "Delay Until" action, set the Timestamp field set to following:
concat(triggerBody()?['Date'],'T09:00Z') /* <-- Date represents the Date column in my SP list */
On your side, you should type:
concat(triggerBody()?['YourDateColumn'],'T09:00Z')
then the "Delay Until" action would be executed at specific individual date.
Please take a try with above solution, then check if the issue is solved.
More details about extracting each date within a date range, please check and see if the response within the following thread would help in your scenario:
Best regards,
Hi @Oskarkuus ,
Yeah. Please consider take a try with above solution I provided, then check if it could solve your problem.
If you have solved your problem, please go ahead tp click "Accept as Solution" to identify this thread has been solved.
Best regards,
User | Count |
---|---|
148 | |
94 | |
85 | |
78 | |
57 |
User | Count |
---|---|
193 | |
175 | |
104 | |
95 | |
91 |