Hi there,
Hoping someone out there can help me with a weird automation issue. First, some context:
I have 2 tables in my base.
Table #1 is the order table - This is used for tracking individual orders (every line order is quantity 1), and the record name is the serial number of the item.
Table #2 is the shipping table - These records are named as followed (rolled up from the records in Table #1): “{Customer Name} + {Site} + {Ship Date}”
So essentially, whether there is 1 order or 20 orders from Table #1 going to a particular customer site on a particular date, I want them all rolled up into a single record in Table #2.
This works perfectly fine manually: I have a column “Shipping Table Name” in Table #1 that follows the same naming convention for the record name in Table #2 ("{Customer Name} + {Site} + {Ship Date}") and I can just copy and paste that into the “Link To Table #2” column. No problem.
But… when I tried to automate it to fill the Link column for me, it only works if the record name already exists in Table #2… (does your head hurt yet? Mine does!)
So! If I haven’t lost you, that’s all the context. Now to my actual question.
I’ve never used scripting but I was thinking maybe there is a script out there that can do something like this:
- Trigger: If a record in Table #1 has “Shipping Table Name” (not empty)…
- Check to see if “Shipping Table Name” exists as a record name in Table #2
- If Yes, update record in Table #1 > 1 field > “Link To Table #2” field updated with “Shipping Table Name” to create the link
- If No, create new record in Table #2 > 1 field > “Link To Table #1” field, which would contain the record name (serial number) from Table #1
Thoughts? Does this exist? Or are there any other ideas out there that will give me the same result?
Thanks friends!