I need assistance with updating a Filter Array to only pull the last months worth of list items. For example, if a list item was created in October, i need the filter array to display all items created for that month at the end of the month.
Here is what i have now. This will send at 12:03 pm est for the last 5 business days. I need it to send on the first day of the new month, all items created for the previous month. How could i accomplish that?
This link did not help, https://powerusers.microsoft.com/t5/Building-Flows/Monthly-email-with-info-about-new-items-in-SP-lis...as suggested on my previous post. What this did was include the last 31 days, which would also include today. When i ran this flow, it pulled results from today. I need the results to only show items created or given in the List from the previous month.
Check out this video I did which shows a way to filter by Month:
How to easily filter a SharePoint list by Day, Month or Year with hidden oData filter functions
Thanks Paulie. After watching this video, i see what you needed done. What i need done, is to only show the previous month, regardless of day, month or year. For example, last month, October 2021, my company sent 15 requests which generated 15 list items in sharepoint. Today, Nov 1st, 2021, i want a email sent with the list items only for the previous month, not to include September or November. Today, we already had 1 item created. My current query, shown in comments, shows last 31days, which would include today. That cant be. How could i accomplish this? If done correctly, it would show 15 results, not 16, for today.
The goal is to have this flow send the email, each month, without any intervention. It needs to know what the current month is, what the previous month was, and send out the email with all list items from the previous month only.
Hi @FKarluk
You can take a try with the screenshots below to get the first day of the previous month and the last day of the previous month, then filter out items whose date is the previous month.
Get last day of the previous month:
Expression:subtractFromTime(startOfMonth(utcNow()),1,'day','yyyy-MM-dd')
Get the first day of the previous month:
Expression:startOfMonth(outputs('Compose'),'yyyy-MM-dd')
Hope the content above may help you.
Best Regards
Yes, so the values you would supply to the action are the current month minus one, and the current year. That will give you back every entry from the previous month. If you watch until the end of the video, I demonstrate how to do exactly what you want.