Change the value displayed in a reference field by a simple reference qualifier

clyon
Tera Guru

I have a reference field on a request form that I have the reference qualifier set up:

find_real_file.png

This returns the sys_id in the reference field

find_real_file.png

How can I change the value displayed to be the user name?

And I don't know why when I select one of the sys_id's above that it populates the field with the 'created date/time'.

Any help is appreciated!! TIA

1 ACCEPTED SOLUTION

I had to make a few modifications and I was able to get this working.   Thanks for your help!   Much appreciated!


In the script include:


function get_projectsponsor_members(){  




  var answer = '';  


var group = 'd4439e614f7cf200f76d27201310c713';       //Project Sponsor group sys id (not on form)


  var group_members = new GlideRecord('sys_user_grmember');  


  group_members.addQuery('group',group);     // ('group',group);


// group_members.addEncodedQuery('group=d4439e614f7cf200f76d27201310c713');


  group_members.query();  


     


  var memberList = [];


  while(group_members.next()){  


    memberList.push(group_members.getValue('user'));  


  }  


  return 'sys_idIN' +memberList.join();                                                                            


}



AND I changed the variable to be a lookup select box field.


find_real_file.png


View solution in original post

15 REPLIES 15

Peter
Tera Contributor

 

In your reference field, the pop-up window will open > it is the one you must configure (right click> Configure> List layout)> select required column

 

find_real_file.png