I’m building a simple CRM and have created 2 data types: Contacts and Companies. My Create Contact workflow on the Submit button includes one step for creating a new thing in Contacts and one for creating a new thing in Companies.
When I create two new Contacts with the same company name (Acme) in testing, I end up with two things in Contacts (yay!) and two new things in Companies, each with unique IDs but both with Company Name “Acme”. I’m unable to find any obvious way to say “only create a new thing in Companies if an existing thing with the same value in Company Name does not already exist.”
This feel like really basic functionality that I’m sure exists, but I can’t figure it out after scouring the documentation and trying lots of different approaches.
First, thanks for the offer, but the point is for me to learn how to do this.
Second, if I’m reading your steps correctly, this approach will prevent me from creating duplicate contacts, but my challenge is to keep from creating duplicate companies. This may put me on the right path though, so thank you.
How do you show some message in this case? Something like “This item exists”.
Also I noticed that when you add two constraints, the second one is not taken into account.
Yeah, This does work however a closer look at the use case (and any use case for that matter) presents more problems. The main one being is that you end up with 15 users on a CRM and now your software presumes each one of those humans will spell “Acme” and use the correct Casing 100% of the time. So Acme, acme acmi, ACME will all produce a “duplicate”
Now there are ways to also prevent this using the “contain” constraints but its not reliable and slows down the app if you do it on all fields that could be duplicated.
It’s crazy that there’s no case insensitive way to search for duplicates before entering a new entry, “right out of the box”. It seems like a basic functionality anyone would need in order to avoid duplicates.
I am just trying to deal with the same issue. Is there a way to do it based on the company email domain? I believe the margin of error there is smaller.
Hi, im sorry im late to reply but i might still be able to help, when you store the data, always add :lowercase to the data you are storing, that way easily check if it already exists or not