Cannot set Unique in sys_dictionary for custom field

SNowUser11
Kilo Guru

Hi,

I have created a new custom field in cmdb_ci_service table and want that to be unique . I am trying to make the Unique filed as TRUE but it does not takes and not updating keeps as FALSE. I have checked all records though is my new instance there are only few records no duplicate values in all those records and they are empty.

Still can not make that new custom field UNIQUE in dictionary as I want Autonumber on that field. Any thing I am missing please help.

Many Thanks

1 ACCEPTED SOLUTION

Hi,

I just saw this thread and was able to make field as UNIQUE because even though all duplicates I removed still it was not updating not sure if Disabling the BR has impact but now the UNIQUE was updated to TRUE

 

https://community.servicenow.com/community?id=community_question&sys_id=96f647e5db1cdbc01dcaf3231f96...

But still strange even after having UNIQUE set to TRUE when I do INSERT & STAY it does not create a new unique number . Am I missing again something? but it works when i create new from the module.

Many Thanks

View solution in original post

9 REPLIES 9

Hi,

The number will remain the same as the auto number will work only for out of the box number field and not custom field.

Thanks,
Ashutosh

DirkRedeker
Mega Sage

Hi

I guess, you must supply a "default value" to make it accept "Unique".

Furthermore, I guess you need to set the field as "mandatory".

Let me know, if that works out?

 

BR

Dirk

DirkRedeker
Mega Sage

Hi

Just a silly question: Did you click on "Save" after changing the value of the column in the List (of the table)?.

Just changing the value in the List of columns will not save the changes.

Let me know if that solved your issue.

BR

Dirk

 

Hi Dirk,

Yes all saved and updated but when we do for other tables like Incident and do the same action INSERT&STAY it creates new unique number but here I am getting the same number 😞

Thanks

Swapnil Soni1
Giga Guru

Hi,

On My Tables, I had to check Text Index, then I could check Unique on first_name:

 

Screen Shot 2017-01-27 at 4.19.11 PM.png

 

If this works, please mark correct or helpful.

Thanks