Help

Script for updating multiple records, triggered by record change

Solved
Jump to Solution
2380 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Lane_Scheiblaue
5 - Automation Enthusiast
5 - Automation Enthusiast

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

Screenshot 2023-08-10 at 6.31.16 PM.png

Screenshot 2023-08-10 at 6.31.52 PM.png

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.

1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

@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.

See Solution in Thread

4 Replies 4
Sho
11 - Venus
11 - Venus

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
18 - Pluto
18 - Pluto

@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.)

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