Cannot reference sys_choice table

arobertson
Tera Guru

Hi,

I'm trying to create a reference field which points to the sys_choice table, but i'm unable to see that table in the list?

Is there a reason for this and/or is there a attribute that i can change to make this table selectable?

1 ACCEPTED SOLUTION

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Alex,



Please check if the below helps.



find_real_file.png



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


View solution in original post

7 REPLIES 7

antin_s
ServiceNow Employee
ServiceNow Employee

Hi Alex,



Please check if the below helps.



find_real_file.png



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin


reg_1979
Tera Guru

Hi Alex,



This table should be allowed to be referenced. My instance is Helsinki.



Please see the screenshot below.



Do you have any customizations on your instance that could be preventing this? Are you logged in as an administrator?



1.png


arobertson
Tera Guru

Strange,



I was trying to add the reference field via form layout and the table was was not there? but i was able to add it fine going straight into the table and adding the field...


michaelvukicevi
Tera Contributor

Referencing the sys_choice table is a bad idea and here is why.



  • sys_choices are stored in the cache and the forms use this cache for performance reasons to display the choices
    • (the drop downs do not reference the table directly but from the cache)
  • if you use update sets to update the sys_choice table and the update is large enough, ServiceNow will drop the sys_choice table and perform inserts instead of updates.
    • (this is also for performance reasons since update   takes more time than insert on large updates.)
    • (Generate a large update set on the sys_choice lists (1000+) and examine the XML payload and you will see a CDATA tag)
  • When this large update set is applied the table is dropped and all of your references on the existing records will be orphaned (empty)
    • I know this from experience.


For what purpose do you need to reference this table?