Unique not working in service-now

soundarSN
Kilo Explorer

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.

8 REPLIES 8

loichorisberger
Kilo Explorer

Hi Rajan,

In order for the checkbox "Unique" to work in the dictionary, you have to make sure the table does not contain duplicates already. If it does, you get the error "CapaJC" is describing.

Regards,
Loí¯c


soundarSN
Kilo Explorer

I have created a new table , add a new field with string (40) , after i enable the Unique check-box via Personalize From layout, still i am not det unique validation. (The table does not contain duplicates values).


loichorisberger
Kilo Explorer

Not sure to understand, can you confirm this does not work:
http://wiki.service-now.com/index.php?title=Specifying_Unique_Field_Values#Requiring_Unique_Values_for_a_Field


Uparerik
Giga Contributor

There is a difference between what a unique key means and whether it works by simply enabling while creating a new field via dictionary. All I'm saying is that, it doesn't seem to work that way. You are required to enable the same via personalize form layout.
Note: If you had the check box on via dictionary, please disable and do it again via form customization
Once you have this enabled, it does validate for duplicates
The question is whether it gets enabled when creating a new field via dictionary and enabling unique check