Form to add data -> duplicate entries

Hi,
I’ve a form with different fields. One of them shall be unique within the database.

I tried to do it this way - but it failed.

There is a submit button - and the button shall be disabled OR the data shall not be created when there is a duplicate domain

image

Hi there, @fok_ste… if I understand your post and your screenshot correctly, you put a condition on the input element that says when the input’s value is not unique, the input must not be empty. With that condition in place, the system will create a duplicate entry because it is only checking to make sure the input is not empty as opposed to stopping the creation of a new thing because the input’s value is the same as one that already exists.

You should remove the condition from the input element and put a similar condition (although, I would likely change it form is 1 to > 0 so the system can stop searching as soon as the count is greater than 0) on the submit button that prohibits the button from being clicked when the condition is true. You could also consider having the first step in the submit button’s workflow be a step that terminates the workflow only when the input’s value is not unique.

Hope this helps.

Best…
Mike

Hi Mike,
I tried to put this into the workflow for the submit button as following:

but I’m still able to add the same data multiple times. any idea?

For that condition, I believe the count should be is 0. Want to give that a shot?

ahh… you’re right… working fine now :slight_smile: Many thanks.

1 Like