Default value for reference field not showing up

yundlu316
Kilo Guru

We have a custom table with a reference field to sys_user and we want the default value to be the current user.  Under the Default Value tab, we put in javascript:gs.getUserID().  When we go back to the form, we can see that a value is in there as indicated by the "i" button next to the field, but the field is empty:

find_real_file.png

How do we get the current user to populate in the actual field?

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

with which user you are testing this?

with the user who submitted the form i.e. David Lu or some other user?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
 
Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader