I’ve got a base with an “Event Finished” formula field that works like this:
IF(DATETIME_DIFF({End}, NOW()) < 0, TRUE(), FALSE())
It resolves into a checkbox, and I use it to filter out finished events from admin list views. My base currently sees about ~15-20ish events a day, which have times attached, and the folks that need to monitor the views have told me they find it really annoying when finished events aren’t filtered out of a given list view.
And it works fine! I could be using IS_AFTER rather than DATETIME_DIFF, but otherwise, it does the job. However, I know NOW is a function to avoid. Its inaccuracies aren’t a big deal to me (if the formula clears out an event 15 minutes later than it should have, that’s not the end of the world), but its computational cost is becoming more of an issue. I assume NOW continues to recompute for every record, even those that are well beyond completed at this point. I’m trying to optimize things so NOW gets called less, so here are some questions:
- Does NOW not compute if it’s behind a conditional branch in a formula that isn’t reached? If, once an event completes, I were to automate setting a single select to “Completed,” and then change the formula with
IF(Status = “Completed”, TRUE(), {{ existing formula }})
, would that mitigate how much NOW is called? - Is TODAY just as much of a process hog? If TODAY isn’t the same calendar day as the event record yet, I’d prefer to be able to say
IF(IS_BEFORE(TODAY, {End}), FALSE(), {{ existing formula}})
, so that NOW is only in use when checking the time on the day of. - Other ways of doing this I haven’t considered? Would an hourly (half-hourly?) automation that checks events for done-ness and marks them as such be less process-intensive than NOW? Manually flagging things to clear off the list is possible, but not what I’d prefer.