Prevent duplicates from text entry

It’s not good practice to add a row and immediately delete it afterwards. It’s most likely adding a row, then your On submit is possibly comparing Product Code to itself, so it will always match and take the Delete path. Also, your Else is essentially adding an Add Row action to a form that already adds a row, so if it did work, you would end up with duplicate rows each time you submit. When using a native form, don’t ever use an Add Row action On Submit, unless you want to add a row to the form table as well as add a row to a different table. In most cases, it’s not necessary and redundant.

I would create a Custom Form for this use case. Then you can check for a duplicate while filling out the form and hide or show the submit button as needed.

3 Likes