Unique not working in service-now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2012 02:17 PM
Hi all,
I have created a new string field with unique.
But its not Enforces uniqueness on the field. Its a bug in service-now?
Please any guide us, how we will achieve unique string field in service-now.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2012 01:59 PM
For some reason, if you enable the Unique check box via dictionary option, it doesn't seem to work. Enable the same by Personalize Form layout at the required field and that should work
- Udhay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2017 12:23 PM
I realize this is a really old thread, but after upgrading we experienced a field where unique was set to true, but not enforced. At the database level, the field was not unique.
To resolve, we turned if off and on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2021 03:20 AM
Thank you for your Information, this solved my problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2012 02:46 PM
I just tested with the following, which worked as expected:
1) created a new 40-character String when personalizing a form
2) Personalize Dictionary on that new field, add the Unique field to the Dictionary form, set it to true, and Update
3) Enter a value for that field in one record in my table, and Update
4) Enter the same value for that field in another record in my table, and attempt to Update
After clicking Update on the second record, I got the expected error: "Unique Key violation detected by database" and the form submission was cancelled.