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

Check your reference qualifier. I said



javascript:new UserUtil().getGrMemberQuery('GROUPNAME');


Hi Chuck,



I've tried by copying in the script above directly and copied the reference qual directly.   The only change I've made is on the ref qual.   I've changed ('GROUPNAMEHERE') to ('SM Managers') which is the list of users I want to be shown in the list reference.



It is still just showing the full sys_user list.   Were I meant to change any other sections of the code at all?



Apologies as I'm new to the scripting element so still very rusty with this.



Thanks


Here's a test. Go to System Definition> Scripts - Background and see what output you get with this test script



gs.info(new UserUtil().getGrMemberQuery('SM Managers'));


Hi Chuck,



When I run the background script I'm getting 7 sys_ids returned.   Just checked and these are the 7 memebers of the SM Managers group


OK. So we know the script include is behaving as it should. That's good.



Can you show me the screenshots where it is used? More context is better.