Skip to main content
Solved

Script for updating multiple records, triggered by record change


I am trying to create a script to overcome the issue with updating multiple records after a "Find Records" search that yields multiple results. 

Automation Trigger: Record from "Packing List" table gets updated to Shipped

Desired Actions:

  1. Use "Find Records" to search for items on the Packing list that were Available and mark them as Shipped (Some items may be on backorder so I want those to remain as is)
    1. This search returns a list of the 2 items (in my example) with Available as their status.
  2. Update the status cell to Shipped

I am not familiar with scripting so any help on writing this will be appreciated! I know I could complete these with Integromat (Make) but I'd rather keep it local to AirTable and less complicated.

Best answer by ScottWorld

@Lane_Scheiblaue 

You don't need to use a script. Just use a repeating series action and loop through the found records and update them.

If your "find actions" step finds more than 100 records, then you would need to use a script or use Make.

View original
Did this topic help you find an answer to your question?

4 replies

  • Inspiring
  • 560 replies
  • August 10, 2023

What table and field setup do you have for this?
If there are Packing lists and Item lists, and Item is linked table with Packing lists, then when Packing lists is Shipped, Item can also be shown as Shipped in the Lookup field.


ScottWorld
Forum|alt.badge.img+20
  • Brainy
  • 8719 replies
  • Answer
  • August 10, 2023

@Lane_Scheiblaue 

You don't need to use a script. Just use a repeating series action and loop through the found records and update them.

If your "find actions" step finds more than 100 records, then you would need to use a script or use Make.


  • Author
  • Participating Frequently
  • 8 replies
  • August 11, 2023
ScottWorld wrote:

@Lane_Scheiblaue 

You don't need to use a script. Just use a repeating series action and loop through the found records and update them.

If your "find actions" step finds more than 100 records, then you would need to use a script or use Make.


Thanks that worked perfectly!  (I had to remove my "If Status is Shipped" condition and added the "shipped" condition to the "Find Records" action since you can't do the repeating series within a conditional logic, but it worked after that.)


  • Author
  • Participating Frequently
  • 8 replies
  • August 11, 2023
Sho wrote:

What table and field setup do you have for this?
If there are Packing lists and Item lists, and Item is linked table with Packing lists, then when Packing lists is Shipped, Item can also be shown as Shipped in the Lookup field.


Thanks for the feedback, In some cases that would work, but I wanted some items to remain listed as "backordered" 


Reply