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:18 AM
You can add the other column in list view of the popup icon which is available for reference type of variable.
Why do you require redundant variable ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2017 10:24 AM
The way we achieved this was to make only one field a reference, we made the USER_ID field a reference and the NAME field a read only string. We have a client script that performs a glide ajax lookup on change of the USER_ID field to populate the NAME field.
On some of our forms it also does the check on load as the USER_ID is populated as the current user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2017 10:50 AM
HI Simon
I did some changes in the user table to display only User ids of all the user but in second field also am getting only user ids but i need names in second variable but this changes wil affected globally so i need some other way to complete this any inputs ??
Any inputs pls

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 05:24 AM
The display value of a table is what it is - it will display that field across the entire system when any other record references a record on that table. If you have name set up as your display field, that's what gets displayed in a reference field to sys_user. There's no way to do name sometimes, and user id sometimes, and email sometimes. Sorry about that.
What you may want to consider is using instead is one reference field to sys_user, which does the name, and then get the userID using michael.ritchie's getReferenceAdvanced functionality in a client script and place it in a string field. It's pretty easy to configure and use.
getReferenceAdvanced, g_form.getReference and GlideAjax Alternatives