Aug 19, 2022 03:45 PM
I am a new user and would like some help figuring out how to write this Airtable Js script. I am trying to change the status of a record base on two conditions in the Maintenance Tracking Table:
If the record has an older Date and the status is Upcoming service check, I want to change the status to past service check. I am using an Airtable automation trigger called “when a record enters a view” .Your help will be appreciated.
Aug 21, 2022 06:41 PM
Well, I don’t know JavaScript at all, so I can’t help you there.
As @kuovonne mentioned above, if you’re 100% sure that there will always be just one matching result, then you could just use Airtable’s native automations to do a “find records” for the matching client name (but not matching the current Record ID), and then update the found record. This will only work if you always have ONLY one matching record.
However, if you might sometimes have multiple matching records (or if you just want to have more flexible & powerful automations), it seems like this would be significantly easier to accomplish with Make instead of trying to write a script. You would just need 3 simple steps, as seen in the screenshot below.
You would watch for when a new record is created, then search for any records that match the client name (but don’t match the current record), and then update the fields that you want to update.
This keeps everything as easy & straightforward as possible, and you don’t need to know any code.
Aug 21, 2022 06:49 PM
Thank you both for your help. I think I should be able to resolve it by myself now.
Aug 21, 2022 07:30 PM
I could be confused with a different post, but I thought an earlier draft of one of the messages said that he already had four automations in Integromat.