- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 11:36 AM
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
When I go to the referencing class (cmdb_class_info)
I am able to see the display name
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 07:20 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 11:43 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 11:58 AM
drop down is a reference to the cmdb_class_info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 05:51 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 08:04 PM
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:
- Calls a Script Include to fetch all records from the cmdb_class_info table.
- Retrieves the display names from the sys_db_object table for each corresponding record.
- 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