Skip to main content
Nintex Community Menu Bar
Solved

Validation to ensure a free-text field entry is always unique?

  • Aug 19, 2021 12:18 PM UTC
  • 3 replies
  • 111 views
  • Translate All

I have a simple SmartForm whereby a user can input a 'Reference', just a string of text which helps to identify a record. I want to ensure that whatever the user inputs here is always unique, but I'm not sure how is best to do this?

 

I noticed you can tick 'Unique' against a field in the SmartObject, but unfortunately it's asking me to wipe the SmartObject's data in order to change this. Is this how it can be achieved, or is that different?

 

Thanks

Best answer by tbyrne777

I don't think there is a great automated way to do this. My approach would be that when the text changes, run a smart object to get a record by the Id that they entered and if something actually comes back, then the value is invalid
View original

3 replies

Forum|alt.badge.img+15
  • Nintex Partner
  • Answer
  • Aug 19, 2021 3:15 PM UTC
I don't think there is a great automated way to do this. My approach would be that when the text changes, run a smart object to get a record by the Id that they entered and if something actually comes back, then the value is invalid
Translate

  • Nintex Partner
  • Aug 23, 2021 8:48 AM UTC
Like tbyrne777 said, i would do the same, you can even test by having a listview and use a for loop to check if the reference already exists, if so then throw an error message and stop the rule execution
Translate

  • Author
  • Aug 23, 2021 9:00 AM UTC

Thanks for the suggestion. In the end I did truncate the table and set the SmartObject field to unique, which in turn created automatic validation when the user attempts to input a duplicate string. However if I come across the same scenario again I will give your method a try!

Translate