Can't set fields Unique

Tony M
Kilo Expert

Hi Everyone,

I Just can't set fields to Unique no matter what I do, I have the personalize_dictionary role, I created the field from scratch, I even indexed It as suggested in other thread but nothing works, fields are still getting duplicated even with the option checked. BTW the table was extended from CI

find_real_file.png

find_real_file.png

Related topics

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/field-administrat...

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

 

Thanks for any ideas

1 ACCEPTED SOLUTION

Swapnil Soni1
Giga Guru

Hi,

Personalize Dictionary for that field. If the Unique checkbox is not on the Dictionary form, personalize the form layout for the Dictionary form and add it. Check it for your field, and update the Dictionary record.

Then a unique constraint will be enforced for that field. Note that the field must not have duplicate values already, or doing what I described will fail.

 

Or you can try this

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

 

 

 

 

Let me know if this works!!

Thanks

View solution in original post

10 REPLIES 10

Rishabh Jha
Mega Guru

Hi @Tony M ,

 

I hope you've verified the records in the table, and that the field doesn't have any existing duplicate value(s). If you can, maybe try to delete all the records (after taking a backup), and then import the data back again.

Also, if nothing works, you can write your own before insert/update business rule, to check for a duplicate value for the field, and if yes, abort the insert/update action.

Thanks & Regards,

Rishabh Jha

Aavenir (https://www.aavenir.com/)

 

MrMuhammad
Giga Sage
Was there any duplicate data available prior to marking unique attribute as true?
Regards,
Muhammad

Tony M
Kilo Expert

@Rishabh Jha  and @Muhammad 

 

Thanks Ill try the business rule since there are no duplicate values, guess its related to the CI table which was used to extend this custom table.

 

Do you guys know if there are any restrictions when extending tables to CI (configuration Item) table?

 

May be something I am not aware of 🙂
Regards,
Muhammad