Apr 04, 2022 05:14 AM
I’m recording sales orders by scanning barcodes of the products that are being sold. For eg: if I’m selling product A, I’d scan the barcode from my phone using the Airtable app and the barcode field would be populated.
Now, my aim is to automatically populate linked records using automation.
Check the image below, I have 2 tables - Inventory (test) and Sales Orders (test). I have scanned the barcodes of the actual products to record inventory in Inventory (test). You can see 10 units of each product with unique barcodes.
Now, let’s check the Sales Order table in the image below,
You can see that the Inventory (test) is linked to the Sales Order (test). So, when I scan the barcode from my phone of an item sold, the automation will be triggered and update the barcode in the linked record.
The images below are of automation,
The trigger would be “when a record is created” in sales order (test)
Action would be “Update the record” based on the record Id from step 1 and update the “Inventory test” field which is linked to Inventory Test.
Now check the below image once again,
record on 4th April was created while testing the automation and it was successful. You can see it was able to fetch the barcode to the linked record.
2nd record was created after turning on the automation and you can see the barcode data was not fetched from the barcode field.
Can someone help me, where did I go wrong? Also, suggest a better way to do this without having manually selected records from the linked table.
Apr 04, 2022 06:02 AM
You would need to use a different trigger. The trigger you are currently using triggers when the record is created, meaning that it triggers while the record is still blank.
Apr 04, 2022 07:29 AM
But, the record was blank. I switched on the automation and then created the new record and the automation still didn’t run.
Apr 04, 2022 07:32 AM
Right, you’re trying to update a blank record with blank information.
In your case, I would probably recommend adding a checkbox field when you’re ready to copy the data, and use that checkbox field as your trigger. Change your trigger to “when a record matches conditions”, and then choose the condition of the checkbox field being checked.
Apr 04, 2022 07:43 AM
Tried that, still no luck
Apr 04, 2022 07:44 AM
test result as always successful but no luck after turning it on
Apr 04, 2022 08:00 AM
Scotts suggestion should work. Did you uncheck and then check the box on that record? You have to reset the internal status of that record if you have it checked coming out of the automation testing.
You could also just change your trigger to look for “barcode not empty AND Attachments empty”? That way however or whenever barcode shows up, the automation will try to populate Attachments.
I’ll warn you that this is a brittle solution, in that you can’t type in a barcode manually and get it to work.
Apr 04, 2022 08:20 AM
Tried, but still no results. Is there a way to share a screen recording? I can share the whole process.