How get the Label of a table in CMDB from a GlideQuery and not the table name

theoracle
Kilo Expert

Hi, 

 

I want to get the Label of the table returned when doing a GlideQuery on the cmdb_ci table

 

Example

for the the computer table

 cmdb_ci.sys_class_name returns 'cmdb_ci_computer'. What should be the expression to be used if I want the Label i.e. 'Computer' returned instead (and not the table name 'cmdb_ci_computer')

1 ACCEPTED SOLUTION

Raghu Loganatha
Kilo Guru

Hi, 

Can you show your code? You can get the display name using the getDisplayValue(); option at the end. Try this and share your code if this doesn't work.

 

var Label = <Variable_name>.getDisplayValue();

 

Let me know if you have questions or mark this response "Answered / HelpFul".

~Raghu.

View solution in original post

1 REPLY 1

Raghu Loganatha
Kilo Guru

Hi, 

Can you show your code? You can get the display name using the getDisplayValue(); option at the end. Try this and share your code if this doesn't work.

 

var Label = <Variable_name>.getDisplayValue();

 

Let me know if you have questions or mark this response "Answered / HelpFul".

~Raghu.