Question: How to check if record already exists in Database?

I am looking to solve a scenario where I populate a database without creating duplicates, here is the use case…

I have two databases, 1 for Repair Claims and the other for Equipment Make & Model.

Use case is…

  1. User submits repair claim form that has text input for Make and Model.
  2. Upon submit, IF Computer Make & Model does NOT exist in Make and Model spreadsheet, then create a record for that Make and Model.
  3. Otherwise, IF Computer Make & Model does exist, DO NOT create a Make & Model record.

Again, the purpose is to build the spreadsheet in time but also prevent duplicates. Any suggestions?

You could use a UNIQUE formula in the Google sheet to dynamically build the list in the Make/Model sheet based on the data in the Repair Claims sheet.

3 Likes

Jeff, do you have an example of the UNIQUE formula? To build the list of make/model…

Here’s an article you can read through.

4 Likes

Thank you!

1 Like

Let us know if you need help with this!

1 Like

Your article worked perfectly. Thank you so much!

2 Likes

@Mark Do you know if it is possible to use the UNIQUE formula (the one in Google Sheets) in Glide tables?

I’m not aware of a way to dynamically build data in a sheet based on another sheet. I would love that option since a large part of my app is centered around the UNIQUE formula to build it.

1 Like

Couldn’t you do a relation to the Make and Model, and if the relation is empty, add the row?

4 Likes

@Mark Yes, I believe that would work. Thank you so much!