When loading a form for the first time, how to make sure the current logged in user is showing ?

SonbolM
Tera Contributor

SonbolM_0-1724952476688.png

When loading a form for the first time, how to make sure the current logged in user is showing ?

1 ACCEPTED SOLUTION

Sid_Takali
Kilo Patron
Kilo Patron

Hi @SonbolM add below code in Reference field default value field which will populate current logged in user javascript:gs.getUserID(); 

Sid_Takali_0-1724952900370.png

 

View solution in original post

7 REPLIES 7

Sid_Takali
Kilo Patron
Kilo Patron

Hi @SonbolM add below code in Reference field default value field which will populate current logged in user javascript:gs.getUserID(); 

Sid_Takali_0-1724952900370.png

 

Soni Tushar
Tera Guru

Hello @SonbolM ,

You can show the current log to the user by setting the default value, : javascript:gs.getUserID(); 

 

Please refer to:

https://www.servicenow.com/community/itsm-forum/how-to-get-current-logged-in-user-and-department-and...

 

If you found my response helpful, please consider marking it as "Helpful" or "Accept Solution." Thank you!

Sandeep Rajput
Tera Patron
Tera Patron

@SonbolM Please configure the default value section on your variable as follows.

 

Screenshot 2024-08-29 at 11.42.25 PM.png

@SonbolM Please mark the response an accepted solution if it addressed your quetion