The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How do auto populate requested field on Project form

June Anderson
Tera Contributor

I am a sys admin and not familiar with the whole development/config in ServiceNow

 

I do, however, want to auto-populate a Requested by field on the Project form so that whenever I open up the project form it auto-populates with the logged-in user 

I would like for it to auto-populate with the logged-in user just like the change request form 

 

On the change form, when you open it to create a change request, it auto-populates the requested by the user.

I have tried looking at OOTB to see if I can see the configuration but I am not able to identify it 

Thank you 

 

I am sure if I am able to identify the code, I should be able to get it done. 

6 REPLIES 6

Mohith Devatte
Tera Sage
Tera Sage

Hello ,

You an follow these steps

1) Open the  project form

2) right click on the requested for field name like below

find_real_file.png

3) click on configure dictionary as show in above picture

4) Once clicking on it scroll down to the bottom and you can see Default value section .Click on that 

find_real_file.png

5)Please write the below script in the field DEFAULT VALUE like below

javascript:gs.getuserID();

6)Try to create a new project record and check if it is auto populating

Please accept my answer if it helped you

@Mohith Devatte 

I updated the script field to javascript:gs.getuserID(); 

 

Did not work to auto-populate the form 

Sorry my bad it was a typo

It should be U uppercase can you please try the below one

javascript:gs.getUserID()

Please mark my answer correct if it helps you

@Mohith Devatte 

ok, this time around it works but I don't see the changes captured in my update set. How can I get it on my update set please, I also have a previous script on the default value as javascript.global.incidentGetCaller();

Will changing the default value to javascript.gs.getUserID(); affect any functionality