How do I find similar records?
Hey there, Tadabase users! Today, I have a quick tip for you on finding similar records. In this video, we'll use data source filters, a details page, and a table component to achieve this. It's a simple and easy process that will only take a few minutes to set up.
First, let me show you what the finished application looks like. We have a contacts table with 228 records, and we want to find similar records based on the first name field. We also have a way to exclude a specific record from the duplicates. For example, if we click on a person named James, it will show us other people with the same first name, excluding the selected record.
Now let's dive into the builder and get started. Keep in mind that this method is best suited for finding similar records based on a single field value. If you have a more complex application where you want to check multiple fields together, this solution might not work.
In the data table of contacts, we'll create a page called "Contacts" and add it to our menu. On this page, we'll use a table component with a details page. We'll enable the search option so that we can easily find the potentially similar records.
On the details page, we'll add another table component and choose the same data table as before. We'll add the same fields and then go to the data source filters. Since we're on the details page, we can reference the field values of the selected record. In this case, we'll check if the first name matches the current record's first name value.
Now, when we preview the page and search for a specific name, such as John or James, it will display all the records with the same first name on the details page.
However, there might be some issues with this method. For example, if we have multiple records with the same first name, the selected record will still appear in the similar record list. To overcome this, we can use a text formula to create a unique string combining different fields. We'll call this formula "unique string" and concatenate the first name, last name, company, and app name fields with hyphens.
Next, we'll edit the data source filter on the details page and add another condition to check that the unique string is not equal to the current record's unique string value. This ensures that the selected record is excluded from the similar record list.
And that's it! With these tricks, you can easily find potential similar records in your application. You can experiment with different fields, like email or date, and adapt this method to your needs. Additionally, you can explore various ways to manage these similar records, such as flagging them with a status field or merging them together.
I hope you found this tip helpful. Stay tuned for future videos where we'll cover more advanced topics. Thank you for watching this episode of Build It with Tim, and I'll see you next week!