Aug 24, 2022 06:34 AM
In the Client table I have the Meetings field, linked to Meeting table. A client can have multiple meetings.
I need to know, if a client has any two meetings closer to each other, then 1 month. If the difference between any two dates is less then a month – formula must return “often”.
Help me please! I can’t figure out…
Aug 24, 2022 10:38 AM
This is tricky to accomplish in Airtable, since unlike in Excel, there’s no concept of row numbers or any inherent sequential order. That being said, there are a few ways you can go about it:
Use a few helper fields to get the job done (adapt the field names I’ve used below to your tables).
a. In the Meeting table, create three new fields:
DATETIME_DIFF({Meeting Date},{Previous Meeting Date},"days")
b. In the Client table, create two new fields:
MIN(values)
IF({Minimum Days Between Meetings},IF({Minimum Days Between Meetings}<30,"Often"))
(The first IF function is to handle cases where a client only has one meeting in the table.)You could use an automation that updates the “Often?” field (by using a script instead of a formula) whenever the Meetings field is updated for a client. (This is a bit more involved and requires you to be on a Pro plan or higher.)
You could run the script mentioned in #2 manually. (This can be done on any plan, provided you’re not using any other extension, since scripts are considered a type of extension.)
You could do some advanced Airtable-fu, which I’ve never attempted before, but would be relatively automatic and doesn’t require any scripting or automation support: Multi-record calculations (c.f. 'running balance,' 'row number,' and the like)
If you’re not familiar with Javascript or advanced Excel trickery, I’d go with the first option. Airtable’s formula functions for arrays is… lacking, so helper fields are the way to go.
Aug 25, 2022 03:20 AM
Thanks for the ideas! They are very helpful:)
But how can we automatically link the actual meeting to the record of the previous meeting? Or get the date of last meeting before actual?
(I’m not familiar with Javascript and on a Pro plan)