Adding validation to a Nintex Form


Badge +6

I created a Nintex form in SharePoint 2016. It is based on a List. I want to put a validation which prompts the user the the record already exists in the list.

 

For instance, when the user clicks on Save, the form should check 3 fields in the list. If the entry that user enters matches what is in the list, the user should get a warning and should not be able to save.

 

Thanks.

 

Mayank


3 replies

One alternative is to address this in your SP list.  On the three columns that must contain unique values set the to "Enforce unique parameters:" parameter to "Yes".  This will index the list for the three columns.  Then if user attempts to save the form with a repeated value in one or more of the columns, a warning message will be returned on the top of the form.


Regards,


Tim

Badge +6
Thanks, but this solution won't work. SharePoint lists have a drawback. We can make an individual column unique, but we cannot ensure uniqueness across 3 columns.

Here is an article,
https://social.msdn.microsoft.com/Forums/en-US/394a345f-a44b-421d-8e7f-1366d396216c/unique-values-for-multiple-columns?forum=sharepointgeneralprevious
Badge +12

@guru2000 try below approach:


 



  • Create a calculated control on the form and create a string by concatenating those 3 column's value for e.g. Col1_Col2_Col3

  • Now on the form add a calculated control and create the same string, I'll add them in a panel which is always hidden

  • Add another calculated control on the form and use lookup function to see if you are getting anything back or if it's empty. Filter on the SharePoint's calculated column value. Add this control in the above panel too.

  • If calculated control 1 and calculated control 2 are equal then item already exists and disable submit button or else enable the submit button.

Reply