Jun 01, 2023 10:50 PM - edited Jun 01, 2023 10:53 PM
Hi, I'm sure the answer to this is really simple and I'm just missing it, but could someone please take a look at this formula and let me know why some records would be throwing an ERROR, but others are working? I'm thinking I've got something in the wrong order maybe?
We have a group events calendar set up and most events are one-off events, but we have a couple of recurring ones that I'd like to set up an Automation for to automatically generate the next event.
This is the formula I'm using:
Solved! Go to Solution.
Jun 02, 2023 07:09 AM
Using DATETIME_FORMAT() and SET_TIMEZONE() should be unnecessary. You can set the timezone shown in the formatting options of the formula.
IF(
AND( {Date & Time}, {Recurring Events}),
DATE_ADD({Date & Time}, 1, "weeks")
)
Jun 02, 2023 01:53 AM - edited Jun 02, 2023 01:59 AM
Hi @Meagan_Caesar!
It's likely that the error is caused by an empty {Date & Time} field value.
You can add an IF check on this field to remove the error like:
Jun 02, 2023 07:09 AM
Using DATETIME_FORMAT() and SET_TIMEZONE() should be unnecessary. You can set the timezone shown in the formatting options of the formula.
IF(
AND( {Date & Time}, {Recurring Events}),
DATE_ADD({Date & Time}, 1, "weeks")
)
Jun 02, 2023 05:17 PM
Thanks Stephen, this is great info and helps me better understand how to structure these sorts of formulas in the future. Weirdly, there weren't any missing dates, so I'm not sure what was throwing the error, but both your response and Kuovonne's work, so thank you.
Jun 02, 2023 05:18 PM
Thanks Kuovonne, this works perfectly and is nice and simple.
Jun 02, 2023 05:25 PM
Happy to help!
Jun 04, 2023 04:57 PM
Hi @kuovonne and @Stephen_Orr1 ,
In addition to this question, I'm trying to set up a field to automatically generate due dates based on certain submissions. Here's what I have, but it won't format as a date, only as the string, so I'm not sure what's not working. It seems to only happen when I add the IF statement.