displaying sys_id instead of display name

Mike Stockman1
Giga Guru

Hi,

I have a catalog item that has a list collector on it.   I am trying to display the names instead of the sys_id.  

When I read the record in, I'm using this:

g_form.setValue('partitions', req.u_my_partitions);

i tried using setDisplayValue. I also tried putting a display name (but I'm not sure I'm grabbing the correct name).

I tried:

g_form.setValue('partitions', req.u_my_partitions, name);   // is it possible i'm dot walking to wrong 'name'?  

and it did show something different but I couldn't figure out where it was coming from.

It's showing the correct sys_id for each of the items...

So - how do I have it display the correct name?  

1 ACCEPTED SOLUTION

nitdubey
Kilo Expert

Hello Mike,



As Shishir mentioned please check the display value for the reference table for the field.



Once you update the reference field display value to true ,issue should be resolved.




Thanks


Nitin


View solution in original post

2 REPLIES 2

Shishir Srivast
Mega Sage

Hi Mike,



Can you please check what field is set for display as true on the table from where you are populating the value?


Also, can you please share the code what are you trying, is req is a GlideRecord object, if yes can we try like.



g_form.setValue('partitions', req.getDisplayValue(u_my_partitions));


nitdubey
Kilo Expert

Hello Mike,



As Shishir mentioned please check the display value for the reference table for the field.



Once you update the reference field display value to true ,issue should be resolved.




Thanks


Nitin