Display user id in one variable and Display user name in another variable in catalog item

kvenkatesh
Kilo Contributor

HI all

Display user id in one variable and   Display user name in another variable in catalog item

I have a two variables in catalog item both are reference   fields connected to the sys_user table   is this possible if yes then how can we achieve this inputs are appreciated

Thanks and regards

Venkatesh

8 REPLIES 8

Sharique Azim
Kilo Sage

Hi Venkatesh,



You can rather use only one reference field to show the   display name (default value could be javascript: gs.getUser() ) and other could be string field   (default value   javascript: current.field_name.user_name (check the field name though)).. You can also populate via client script using getReference() function . GlideForm (g form) - ServiceNow Wiki



Any particular reason you want reference field to show the user ID?


Hi Kvenkatesh,



Did you get a chance to perform the steps advised by me?


vinothkumar
Tera Guru

Hello Venkat,



For every table, there should be only one display value.



As Sharique suggested, use reference field to show the display name and use string field for user Id.


Midhun1
Giga Guru

Hi Venkatesh,



We have only one display value for table.



Only one field can be defined as the display value for a table. When you set the Display value to true, a business rule sets the Display value to false for all other fields on the table. In previous versions, you must manually ensure that no other fields on the table have a value of true in the Display column.


Note


Note: Extended tables inherit the display value of the parent table. Setting a separate display value for the extended table overrides the parent table's display value.