I’m trying to make an automation where on the first of the month it adds multiple rows. For this table, the main column is Date. I’d like it to populate a row for each date, from the day the automation goes off until the end of the month.
I was looking into formulamap and sequence, but I’m honestly unsure which is the correct route to go or if I’m looking in the wrong direction. I also thought endOfMonth() would be helpful, but again from there I’m not too sure.
To explain the formula a little bit (for you and future readers of this post)… Sequence(start, end, by)
Start = Date(Today().Year(), Today().Month(), 1). This assumes you are pressing button in the month itself (determined by Today() and i set the Day as 1st.
End = Date(Today().Year(), Today().Month(), 1).EndOfMonth(0). This again assumes you are pressing button in month itself but to set the end date, we use the EndofMonth() formula with offset of “0” to denote month itself.
Note - there isnt need for “by” in the Sequence formula.
For the FormulaMap part, it takes each value in the list (Sequence of 1st day in month and last day in month) and adds a row to the table with stamping of current value i.e. the date.
then i would set up the automation to press the button with the trigger as time based on first day of each month.
hope this helps!
Cheers!
Mel
p.s. to create a more foolproof robust solution, some things you might want to consider is putting disabling on the button if there is already rows created for that month