Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

show the Reference field Value with Display name

Vamshi Krishna2
Tera Contributor

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.

VamshiKrishna2_0-1667733100916.png

VamshiKrishna2_1-1667733267366.png

 

 

 

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;
})();

3 REPLIES 3

Sagar Pagar
Tera Patron

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

The world works with ServiceNow

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.