Reference Field Showing Sys_ID Instead Of DisplayName

Antonio42
Kilo Guru

Guys, I already tried using setValue and setDisplay, both are not working correctly, It seems to be any bit detail I am not finding. It worked in other fields but not for category field.

g_form.setValue('category', '7ab5be77dbacef406760000c8a961980');}

1 ACCEPTED SOLUTION

David Ramirez
Kilo Guru

Hi Antonio, 

First of all you should make sure your field is a reference, for example if you are talking about the incident.category (this field type is not reference) you can just do setValue using the internal value of the category, which you can get by looking at the choice values as follows:

find_real_file.png

and in this scenario you could do g_form.setValue('category', 'inquiry');

 

otherwise if the field type is reference, and the reference is valid but showing you the sys_id then you need to set the display value for the table you are referencing by following the documentation Select a field as the table display value

View solution in original post

3 REPLIES 3

Mike Patel
Tera Sage

if you have reference field than go to that table and configure dictonory > set name to display true.

find_real_file.png

David Ramirez
Kilo Guru

Hi Antonio, 

First of all you should make sure your field is a reference, for example if you are talking about the incident.category (this field type is not reference) you can just do setValue using the internal value of the category, which you can get by looking at the choice values as follows:

find_real_file.png

and in this scenario you could do g_form.setValue('category', 'inquiry');

 

otherwise if the field type is reference, and the reference is valid but showing you the sys_id then you need to set the display value for the table you are referencing by following the documentation Select a field as the table display value

David, you are right!

thanks