How to auto populate with current user

iquita2005
Giga Contributor

Hello community,

I will like help with a request I have been assigned to. I have created a catalog item request. One of the variables is "who is submitting this request"? I want it to auto populate with the current user. I don't know what script to use to make this possible. Any guidance will be appreciated.

Thanks

1 ACCEPTED SOLUTION

You can do this right in the variable declaration itself. No client script necessary.



find_real_file.png


View solution in original post

6 REPLIES 6

I'm glad you got your question answered. Thank you for participating in the community.


BALAJI40
Mega Sage

Just write a on load client script,


in the g_form.setValue ('field name', g_user.userID).


refer the glide user page: http://wiki.servicenow.com/index.php?title=GlideUser_(g_user)#gsc.tab=0



If you need tp populate all the items, then create a field in variable set and use the variable set in all required catalogs and write on load scrip on variable set.