Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Question: Script that update a record that has the same fieldvalue as new record

Topic Labels: Scripting extentions
289 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to delete a record that has the same criteria (person_id + project_id) as a newly added record?

Within our organization we have a table in which people give their estimate of hours per project. They fill this out via a form.

screenshot

Now they have to give an update as soon as they see a change coming.

I am looking for a script code that will compare the fields (person_id and project_id) as soon as a new record is added and remove the old record if there is one and then add the new record. And if it is not there, then the record is simply added.

Does anybody know how to program this in a script?

Thanks in advance :pray:
Robert

2 Replies 2

This sounds like a straightforward use case for an automation script. Are you looking for a free script or do you have funds to hire someone to write the script?

Have you considered moving the data to a different linked table and using a system to identify the most recent record for each person/project combo? This way you could preserve the historical data while also using only the most recent data.

Thanks Kuovonne,

No I did considered your solution to move the most recent record to a new table. This can work.
Thanks Robert