Display user id in one variable and Display user name in another variable in catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2017 10:04 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2017 10:43 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2017 01:50 AM
Hi Kvenkatesh,
Did you get a chance to perform the steps advised by me?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2017 03:08 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2017 03:55 AM
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: 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. |