Data Entry form for Contacts to identify duplicates

Hi I am new to bubble and also new to programming.
I am trying to create a form to manually enter all the contacts, store and list them in a table.
I have been able to create a form and also list the submissions in the table. Now I need to figure our a way to validate the entries to avoid duplicates.
If user enters the emailid and second name same as what is already in DB and submits the form, it should show a message that this contact already exists do you wish to overwrite? If user hits yes, the DB entry gets over written.
Any help will be highly appreciated. Thanks

Hi there, @blueoceans2002… if I understand your post correctly, one way you can do what you described is to create two workflow events, one that runs when a count of contacts with the same email address is greater than 0 and one that runs when the count is 0. So, something like this…

In the event where the count is 0, you would have an action that creates a new contact. In the event where the count is greater than 0, you would have an action that shows the message about overwriting the existing contact. You would likely have a button on the message that confirms that the user wants to overwrite the contact. When that button is clicked, you would run a workflow that makes changes to a thing, and the thing to change would be the first item of a search for contacts where the email address is the same as the email that has been entered in the input field.

Hope this helps.


Hi @mikeloc thank you so much, the proposed solution is very helpful. I will implement that.
However I have an interesting scenario where I would like to validate two entries within the form for its uniqueness which is email and the last name as an additional check.
With the current proposed approach, it would stop the data entry user as soon as they make a form submit. Then the data entry user would fix one issue and tries to resubmit the form again and at this stage the user will see another warning message that last name is a duplicate too for the email address entered. So how can I validate two form fields (co-relating email and last name) at once when the submit button is clicked so that the user knows that there is a duplication of data entered and fix them all at once?
Thanks in advance for all the help and great support.

If you are trying to make sure a user can’t create a new contact that has the same email address and the same last name as an existing contact, you could add another constraint to the right side of my screenshot where last name = some input's value. However, that doesn’t really make sense (to me, at least), and I guess I’m not sure what you are trying to do here. I mean, last name is not a unique identifier, so why does it matter if two contacts have the same last name, regardless of whether or not they have the same email address?

Hi @mikeloc ,
So sorry for not providing a detailed context and thank you so much for the prompt response.
I am trying to build a lite inventory and order management app which would have many similar validations (pulling 2 or 3 fields together). The validations can be on customers, inventory, orders and vendor invoices.
At this stage I am just doing a feasibility test on bubble if this is possible and is this within the capability of my programming skills. So far I am loving it and looks positive with awesome support from the forum members.

In my business case, Eg scenario in real business could be that a supplier could issue an invoice with same invoice no., invoice data and account no. twice at different times. If the data entry teams enter it twice, it could be duplicated which could impact the accounting and finance reporting.
Same could be a scenario with customer who could have two accounts with same email and same last name between two business units (as it is a SaaS design).

When it comes to invoice validation what happens is if we add it as a constraint, it is looking for all the rows in data base individually instead of a combination.
The query for validation I am looking for is For a supplier with account no. (as in input) check if there any duplicate invoice with same invoice no. , period from and period to.
Same for the customer for a business unit ensure the customer with same email id and last name exist only once.

This topic was automatically closed after 70 days. New replies are no longer allowed.