cmdb_class_info

begsa
Tera Expert

I want to display the cmdb_class_info in a drop down from the portal view for the user to select.  When I do that I just get class name, but I want to also show the display name to the user.  

This is what I have displaying on the catalog item variable

begsa_0-1731094305358.png

 

When I go to the referencing class (cmdb_class_info)

I am able to see the display  name

begsa_1-1731094462482.png

 

How can I get the display name that is more user friendly to show up on the dropdown for the catalog item?  The variable I currently have is a lookup select box

 

1 ACCEPTED SOLUTION

begsa
Tera Expert

Thank you for your suggestions, there is no easy way to extract the information we wanted, but we got around it by adding a column on the cmdb_class_info table for a friendly name and added it to the look up field on the variable

View solution in original post

5 REPLIES 5

Bert_c1
Kilo Patron

You need both 'label' and 'name'/'sys_class_name'. However, you have not stated where the 'drop down' is from, maybe a field that references the 'sys_db_object' table?

drop down is a reference to the cmdb_class_info

I don't know how you change that behavior, I see on that table there is the 'class' and 'sys_class_name' fields. I don't know which contains the info you want to show. Maybe others here have a suggestion.

Juhi Poddar
Kilo Patron

Hello @begsa 

 

The "class" field in the cmdb_class_info table is of type "Table Name," which stores the technical names of tables. In a catalog item, however, we don’t have the option to use a table name field directly, so a reference field is used to display the associated values.

To display both the display name and the technical name together, we’ll need to write a client script that:

  1. Calls a Script Include to fetch all records from the cmdb_class_info table.
  2. Retrieves the display names from the sys_db_object table for each corresponding record.
  3. Passes this combined data to the client side and sets it as an option in the reference field for easy selection.

"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"

 

Thank You

Juhi Poddar