In the SharePoint list, I have a column let's say "Month". I want that every month this list creates and displays as many items as there are days in that month in this column. Let's say July has 31 days. At the start of July, there will be 31 items in that list and every item displays one date, as the first item on a list is 07/01/2021 and the second one 07/02/2021, etc. until the last one is 07/31/2021. Is there any way to do this? I know the calendar exists but the rest of my intentions doesn't sit well with that.
You can achieve this using Power Automate. (Reference: Get Days of the Month)
Save the Start of the month in compose action.
Initialize variable to set Start_Date as string and value of output #1 compose.
Initialize an array - as array output of #1 compose. This is going to be used to loop through between the date range.
Create Do Until loop - set 'StartDate' and compare output value with 'EndOfTheMonth' compose action i.e. #2 step
Create compose action again to add 1 day into start date with expression as follows :
Now add action to set variable value of 'StartDate' from previous compose output.
Add append to array variable - Select 'DateArray' with the value of 'StartDate' - This is going to append array variable.
- Loop through the DateArray and create items in the SharePoint list.
Items are created in the List as below.