List field displaying sys_id rather than name after being saved

Sam Ogden
Tera Guru

Hi All,

We have created a list field on our incident table called u_escalated_to.. This is a reference to the sys_user_grmember table and has a simple filter of Group is SM Managers.

When you first select the name in the list it displays correctly.

find_real_file.png

Once you save the record it is displaying as the Sys_ID

find_real_file.png

Any suggestions on how to get it to retain the name rather than the sys_id?

Any help is greatly appreciated

Thanks

1 ACCEPTED SOLUTION

Sorry Sam. Mistake on my part. Go to the script include and change the line:



list.push(grm.getValue('sys_id'));



to



list.push(grm.getValue('user'));



The list was creating a bad list of sys_ids.


View solution in original post

36 REPLIES 36

HI Chuck,



I've removed the client callable tick, but it is still behaving the same and does not appear to be being called?



Thanks


Wow, Sam. I get the feeling that there is something simple missing. I've done reference qualifiers like this dozens of times. It's just one of those things that's tricky to "see" via the community. Sorry about all the back and forth. You've got the field set up with the Advance reference qualifier (making the Javascript call.) We've tested it from scripts background so we know the script include is working - it's just not being called. That points back to the field definition.


Hi Chuck,



Thanks for all your help and patience with all the back and forth.   Finally got this working and you were correct it was something very simple.


I've just noticed that there was a space before the reference qualifier.   Only just noticed this, it was difficult to tell visually, obviously has happened by pasting in the reference qualifier.   I've noticed in my short time working with scripts, issues like this are the most frustrating when everything looks fine and should work.



A quick question on best practice.   I add a few log statements to the script includes to try and establish what the issue was.   Now that the code is working as expected is it best practice to remove these or just leave them in place?



Once again thanks for all you help



Cheer Sam


Hi Chuck



Apologies for having to come back once again.   I have got this working as expected in Dev, Just moved to Test and it partially works.   If I add 1 person to the List and save it keeps showing the display name:



find_real_file.png



However if I add multiple people from the list, they all show as display value, but once you save the log the first person remains as the display value, but the rest show as sys IDs, any suggestions?



find_real_file.png



find_real_file.png


Does the target table have a display value field identified?



Does the user have read-access to that field?



Does that display field happen to be a reference field to another table?