Jump to content
  • 0

How to use Triggered Action to validate data?



I would like to understand if triggered actions can be used to prohibit the insert or update of data if a record already exists. I have two fields in a table that need to be unique, ID and Month. How do I let the user know if a record already exists and to stop the insert or update? I understand I can use If/then logic to look for the existence of a records but how do properly convey that to the user? It would be nice to have an on screen message that say 'Data for <Month> and <ID> already exists'.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello @SQLNikon,

In case if you have a unique combination of the ID + Month, the best option is a Formula field in the table.

You may concatenate these 2 values and make the Formula field unique. This is so-called Composite key and here in the tutorial video https://www.youtube.com/watch?v=TvNfQDZysDQ&t

When the user submits the existing unique value, the message appears: "Values cannot be submitted due to a data restriction."

This message can be customized in the Localizations.



If this is not the option that you were looking for, please update this thread and elaborate on your workflow.

Please note that it is possible to restrict the submission with a Triggered Action as well. However, Trigger operates on back-end and it is not possible to show a message for the user.

Usually, you need a combination of the Trigger and JavaScript to achieve the result. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...