Calender.Add events with formula

Hi! Need advice from the Community enthusiasts :slight_smile:

Given: there is a table with formulas in columns. The table contains dates (days) and related events. The table has an offset in days: date = today + offset (it’s a weather forecast for 5 upcoming days).

Goal: the User clicks the button and the data from this table is added to the calendar. Need to collect data from several tables into one common calendar to the desired date.

Problems: 1) Getting unknown error (there is no details, so I can’t understand what exactly the problem is). 2) Adds only one event out of several.

Question: is it technically possible to add events to a calendar for upcoming days? Example: Today is May, 4. It was necessary to add May, 4 and May, 7. Only May, 4 was added.

Use case (expand)

the doc collects health statistics depending on the weather. Next, the doc receives a weather forecast and tries to predict when the user will have certain problems. Due to technical limitations, the user should look at the forecast for each problem and weather factor separately. So I would also like to have one common consolidated calendar.

I would be grateful for advice. Here’s a link: https://coda.io/d/MeteoHealth-Total-forecast_ddRAFQrmllD/_suFPg
(Go to FORECAST - > Detailed & Forecast).

Hi, you were very nearly there, actually. :slight_smile: The main problem was that the column containing the Actions has to be defined as a “Button” column in order for actions like AddOrModifyRows() to work. One other problem was the way you were addressing columns inside the action which broke the “update” ability (it kept adding new rows). I also replaced an AND(expr1,expr2) with expr1 && expr2 because, due to the way AND() works, it causes your application to go really slowly. (I reduced calculation times in one of my docs from 41 second to about a second and a half simply by re-writing the AND()'s!)

Anyway, hopefully I’ve understood what you’re trying to do properly! Here it is.

1 Like

It works now! I am so glad, I almost lost hope that I could finish it :slight_smile:
Thank you for your efforts and quick response!

1 Like

No problem. Glad I was able to help. :slight_smile:

1 Like