Prevent adding data

Hi All

I would like to add a task which adds a new record to a table only if it pass a validation. Something like
if UserExistsInTable then DONOT add a record

How can I do this when I press a button SAVE

cheers Claus

Hi @Clau-d12b

Thanks for posting in the community!

If you’d like to only add a row of data when certain conditions are met when the ‘SAVE’ button is pressed, you can utilize the ‘Run Options’ settings on your ‘SAVE’ button. We have a great article that reviews how to use ‘Run Options’. You can find it here.

What I may recommend you do to achieve the same result and keep your app users informed on whether their inputs can be added as a new record or not, is to utilize conditional visibility and data validation together. The idea here would be to show your app users a disabled grey ‘SAVE’ button and once they input information that meet a condition you are looking for, a live blue ‘SAVE’ button will appear instead enabling them to add the record. In addition to this you can create a message to app users that informs them on why they are unable to submit (ie. “This user record already exists”). Note: You can also add conditional visibility on this message as well to only show when certain conditions are met. You can find more information on how you can utilize conditional visibility and data validation here.

If you have further questions on this, let me know. I’m more than happy to help! :grinning: