Help

Create a new record if not exist

Topic Labels: Automations
2270 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Chen_Pro
6 - Interface Innovator
6 - Interface Innovator

Hi there,

I have 2 tables in the same base, 
one for adding data and one for report.

I want to create a new record in the "report" table every time I add a new row to my "data" table with an automation.

BUT I don't want to have a duplicate records. 
I want to check if the text in the "Name" column in my "data" table matches "Name" column in the "report" table.
(if they match - do nothing)

I try to do it with "Find records" but I don't quite familiar with it.
What is the best way to do it?

Thank you.

4 Replies 4

If the value in the "Name" column doesn't contain commas and the primary field of the "Report" table is the "Name" column as well then you can do this easily by pasting the value from the "Name" field into a linked field to the report table:

Screenshot 2024-06-04 at 10.44.49 PM.png

Link to base

If the "Name" value that's being pasted in already exists in "Report", then the records will be linked together, and if they don't exist then it'll create it in the "Report" table and then link it

Chen_Pro
6 - Interface Innovator
6 - Interface Innovator

Thanks for your reply,
I have a little problem with the "update" method.
When I create a new row in "Data" the automation immediately creates an empty cell in "Link to Report" without 'waiting' for the data to be written. it's good for pasting data or getting it from another source with an API, but I need to do in manually inside airtable

Hm, for that situation you could just copy the value from the 'Name' cell and paste it into the linked field? 

If you need this to be fully automated, you could try using a "Last modified time" field and a formula field to check that it's been 1 minute since the 'Name' cell has been updated and get your automation to trigger off of that

Hi,
I think using 'Find Records' might be easier.
Just create a step to find 'Name' from trigger record in the column 'Name' of Report table.
The output of 'Find Records' is a list of records (limited to maximum 100)
and then add conditional logic - run only when the length of list is 0
Put your desired action(s) inside condition group.

Alexey_Gusev_0-1717595925200.pngAlexey_Gusev_1-1717596019655.png