System Class Name data type in CMDB_CI table

Sashi K1
Kilo Guru

Hi

I see cmdb_ci table has a column 'Class' whose data type is System Class Name. But there is no such datatype exists in available data types. I'm trying to mimic list of classes to be displayed in a custom table as a choice field. In Berlin I could do it but in Eureka how do I create a custom choice with list of CMDB classes displayed as drop down? I don't see any 'System Class Name' type when creating a custom table. How do I create a choice field in a custom table to display list of CMDB classes without any scripting during onload etc...

 

Thanks

Sashi

11 REPLIES 11

Sashi K1
Kilo Guru

Just to add more information to above question...



There is an attribute 'fieldChoicesScript=DictionaryChoiceFields' at sys_dictionary.choice_field which is blocking choice options to filter some columns. If I remove this attribute from sys_dictonary.choice_field the drop down shows up with all values include 'Type' which shows list of Classes in custom table.



May I know what is this attribute 'fieldChoicesScript=DictionaryChoiceFields' and what is the impact if we remove it?



Thanks


Sashi


No response? what is new way of creating a choice list field to display list of sys_class_name in a form? Except that a script to pull using GlideRecord.


Alright finally could create a custom field to display all cmdb_ci classes (table names)



This is how I solved



Create a custom field type String


Gave column Label, column Name, Max length



Save



Click   on Advance view



Fill in Attributes text box with --> skip_root=true,base_table=cmdb_ci


Click on Choice List Specification tab


Choice --> Drop down without none



No other changes, Update


Custom field on form now displays a Dropdown with list of CI class names (cmdb_ci tables)


Hi,



the same way without attributes:


Create the field as string and then select a Dropdown choice.
The Choice Table should be cmdb_ci and the Choice Field: sys_class_name.



Regards!!!