Save the date! Join us on October 16 for our Product Ops launch event. Register here.
May 17, 2022 08:32 AM
I have inventory that is permanent and gets checked in and out. I have created a form that includes the status change, the inventory ID, and the name of the person who checked it out. We often check out 10+ items at one time, making them all part of 1 transaction.
The form form has a multiple select option for choosing every item they are checking out. The form data goes to a transactions table that is linked to a parent table that shows UTD inventory of all of our items at any given time.
Essentially, the process would be:
form submission → record created in transaction table → update status of selected items in the parent table
Here is the current automation I’ve been trying to work with, where it will run successfully:
And how it is running unsuccessfully:
I’m aware that the issue directly comes from AT not reading both Record IDs to update.
I do not have access to apps, only to scripts. Please help!
May 17, 2022 09:06 AM
Hey Wendy, looks like the automation’s breaking as it’s trying to update two records at once.
With the way I’m guessing your base is set up, you’re going to need to use a script for this. If you’re not comfortable maintaining a script, we might want to consider rearranging the table / changing up the workflows a bit
If you could share a couple of screenshots of the relevant fields and tables of your base, or better yet, a read only duplicate of your base with sensitive data removed, that would be extremely helpful for anyone trying to provide advice
May 17, 2022 09:26 AM
Hi @Adam_C , thanks for your quick reply!
Here is a screenshot of what my Parent table looks like:
Here is the form that reflects to the Transaction table:
Here is the Transaction table:
I also did create an automation that works, however even with AT’s increase in automations to 50, I may still end up with over 50 items in the future, so this may be a band-aid fix and will have to go back and be reconfigured as our inventory grows:
The updated record field input is just the record ID on the parent table.
I would have to create this automation per inventory item, which will max out at 50 automations, making in unsustainable long-term.
I’m comfortable with use/editing of scripts, but I need the jumpstart + a little explanation.
Thanks!
May 17, 2022 08:06 PM
Hey Wendy, understood, thank you for the details!
I’ve thrown something together for you here and you should be able to see the script in the automation
Let me know if you’ve got any specific questions about the script!
May 17, 2022 11:19 PM
Hi Adam,
How do you delay the automation run for few secs? I’ve always had this issue where the automation doesn’t run properly due to certain column has not been populated.
Thanks !
May 17, 2022 11:27 PM
Hey Hendrik, to do this I usually have another formula field that checks if NOW() is later than the created time of the record + 5 minutes or something. This is for situations where any of the fields involved might require multiple updates (For example, when adding line items to an invoice)
In a situation where none of the fields involved require multiple updates, I use the “When record matches conditions”, and make it only trigger when all of the fields the automation needs are filled
May 18, 2022 12:52 AM
Ah interesting! Thanks for the tips.
May 18, 2022 05:20 AM
Is this because you are in a free workspace, or a different reason? If you are in a free workspace, you can only run button scripts, not automation scripts. Also, in order to update multiple records in an automation without scripting, you typically need to run the automation once per record, and you may not have enough automation runs in a free workspace.
May 18, 2022 11:48 AM
@kuovonne I have an enterprise account, but our AT admin has disabled company use of non-AT apps & I had to get special permissions to use the script function.
May 18, 2022 11:53 AM
I have an example of a script that introduces a pause in an automation in my set of Automation Helpers in my Gumroad store.
Keep in mind that this introduces a pause, but does not include a fresh read of the values in triggering record. You may need to do a fresh read of the record (either in a script or using a “find records” action) in order to get values that have changed after the automation was triggered.
Using NOW()
does work, but it has some drawbacks.