show the Reference field Value with Display name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 03:15 AM
Hi I have written below script for catalog variable which is type of reference I was getting the output but this is not displaying on the field
The reference field I have Lob Name I was getting ABC as the backend but not populating on the field.
javascript: (function() {
var query = '';
var member = new GlideRecord('sys_user_grmember');
member.addQuery('user', current.variables.get_user);
member.addQuery('group', 'sys_id of the group'); //group sys id
member.query();
if (member.next()) {
query = 'name=ABC';
} else {
query = 'name=XYZ';
}
return query;
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 03:28 AM
Hi @Vamshi Krishna2,
Check the display field on table level for reference table. Make sure 1 field should be display as true.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 04:05 AM
Hi now I have set the display value true to name field and only this name field has display value true but still it is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2022 04:20 AM - edited 11-06-2022 04:22 AM
Hi @Vamshi Krishna2 ,
Take a look at supportive kb -
Reference field is not showing the expected display value when selected or it appears blank
reference field on a list is showing empty value but the form shows correct value.
Thanks,
Sagar Pagar