Hello, let me first give a little backstory on the process I have leading up to where I need help...
I have two tables (Table1 and Table2). There is a button on Table1 that triggers a script. The script copies a few fields from Table1 over to Table2, one of which is an alphanumeric code. While copying this alphanumeric code over to Table2, it also performs a check to see how many times this code already exists in Table2, and populates that number into a field. Table2 contains a complex formula that uses the existing alphanumeric code and the number of times that code has been seen before, to generate a new unique alphanumeric code. All of this works flawlessly, I'm just struggling to figure out how to execute the last step... copying this new unique alphanumeric code back to a field on Table1.
First attempt at a solve, I setup a new automation that watches for new records entering a view on Table2. From there I know I'll be able to reference my new unique alphanumeric code, but I can't figure out how to identify the record on Table1 to paste it into.
I tried setting up a "Last Modified" field on Table1 that monitors a Text field that is updated by the script the button executes. This should act as a flag for either an Automation or Script to find the proper record, but there doesn't seem to be a way to find the latest date/time in a field with Automations... I'm assuming there probably is a way in a script, but I'm not sure of the proper syntax.
Hopefully that's a clear enough description. I feel like I'm almost to the finish line with this crazy process... if anyone has any ideas on how to complete the last step, I really appreciate it!