Adding multiple rows with dates

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.

1 Like

:waving_hand: @Sarah_Noah_K-POP_BAZAAR

you’re on the right track! :slight_smile:
everything you mentioned (FormulaMap, Sequence and End of Month) goes into the final solution…

a 2 prong approach -
i would first create a canvas button to add the rows to table itself. Would looking something like this

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 :slight_smile:

4 Likes

Thank you so much!! Such a huge help I really appreciate it!!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.