Help

Re: Script to conditionally update a single select field in airtable base

2466 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Norcius_Noel1
5 - Automation Enthusiast
5 - Automation Enthusiast

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:

  • Date: Older date or Time stamp
  • Status: Upcoming Service Check

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.

12 Replies 12

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.

Screen Shot 2022-08-21 at 4.09.10 PM

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.

Thank you both for your help. I think I should be able to resolve it by myself now.

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.