Nov 19, 2024 12:35 PM - edited Nov 19, 2024 12:36 PM
TIA for any assistance.
I have table1 (vuln) and table2 (archive). I have an automation that when the record is created a UUID is created in the vuln table. Then, when the status field of a record in vuln is changed form "new" to "closed" it creates a copy of that record in the archive table.
What I need is another script that does the opposite. When the status field of a record in vuln is changed from "closed" to anything else (basically re-opened) it needs to find the record in archive based on the UUID field and delete the copy of that record from the archive table. I have the trigger setup, but I can't get the script to return the record.
It returns the query, but the filter does not seem to work.
This would be easy if I could just do a view, but I can't. I need to do a weekly purge of the data in the vuln table, but leave the data in the archive data. Hence the data copy.
Here is what i am using for testing:
Nov 19, 2024 03:15 PM
Hey noob,
Could you try removing the single quotes around 'vuuid'? that might be causing it to compare to the string literal instead of the value.
Nov 20, 2024 02:44 AM
Hey @noob,
Why don't you trigger the automation immediately and do you want to run it weekly?
You could delete immediately the record for which there automation was triggered, the code for this simpler and available in documents from Airtable.
Thanks
Dimitris
Nov 20, 2024 08:54 AM
That would be easier, but ... I need the user to be able to re-open or unwork an item for 7 days.
Nov 20, 2024 09:14 AM
I refactored accordingly and now it works!! Thank you.