Button to create rows for the next month

Happy Monday all,

I have a table where I’m pulling in information from Google cal and need rows for each day of the month. Is there a way to have a button add rows for the next month?

Thanks.

1 Like

Yes @Karina_Mikhli you can use the AddRows() formula to add rows to a table. You haven’t provided enough details for me to help you further, but Coda can do this!

1 Like

Thank you.

It’s a table where every row is a new date (it pulls information from other places). So I needed to add a row for 6/8, 6/9, etc. My ask is if there is a way to auto-populate rows with the future dates? This is easy in Excel but I know Coda works differently, so am wondering if it’s possible here at all.

Please let me know if any of this is unclear.

Hey Karina,

If I’m understanding correctly, a set up using Sequence() & FormulaMap() should suffice. I used named formulas to make the button formula easier to read. I’m using Sequence() to list every day of the month between the start and end dates, then I’m using FormulaMap() to add a row to the table for every day of the month. It’s meant to be run on the first of the month by automation though since it uses the Today() formula, but I’d imagine you can use Controls or manually set the start/end values if you’d like to populate the dates ahead of time.

Hope this helps!

4 Likes

Thank you! I’ll try to implement this soon and let you know if I have any questions.

Here’s another example using Date pickers instead of formula-generated constants. This will allow you to adjust the start & end dates of rows to be printed to the table.

3 Likes

Thanks again for all your help.

1 Like

@Renita

Hello, could you please write the formulas, or make screenshots, or open access to the file so it was clearer with an examples. Thank you very much!

1 Like

Thanks for bringing this to my attention! Just updated.

1 Like

@Renita Thank you so much for the quick response!
The document is open for comments only, i.e. there is no way I can see the formulas.
Could you please show the formulas in some way that is convenient for you?

The doc is comment-only for security purposes, but you should have the option to make a copy of it. Here’s a GIF for reference.

CopyDoc

1 Like

@Renita

Is there any other way to automatically count the first day of the month (current month, next month, etc.) other than EndOfMonth(Today(),-1)+1 ? I couldn’t find the answer on the forum.

107 firefox

HI Renita,

Could you explain your question a bit more? The first of the month is “1”?

Regards
Piet

Yes.)) I meant in date format, not number format.

Hi @11177,
you can also use DateTimeTruncate:

e.g.:Today().DateTimeTruncate("month")
and therefore
EndOfMonth(Today(), 5).DateTimeTruncate("month")

1 Like

@Federico.Stefanato Thanks for the reply! This is an interesting option.
I thought maybe there was a simpler and shorter one.

116 firefox

115 firefox

@Federico.Stefanato @Renita

Could you help me - I need to put the dates in the groups, each one separately - like in the picture.
How do I do that? Thank you so much for your help!

Hi @11177
it’s not super clear to me…

Do you need to create two groups of the same set of dates (as in your picture)?

Maybe having access to your doc (or a copy of it) and an explanation of the overall use-case would help to have a wider perspective.

Thank you!

1 Like

I apologize for the inaccuracy. Yes, the same set of dates in each group.

How to generate dates is above:

125 chrome
126 chrome

, but how to do it in each of the groups individually.