Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to write the default value to set the field's default value as current user's email?

chenyanwei
Giga Contributor
1 ACCEPTED SOLUTION

Shweta KHAJAPUR
Tera Guru

Hi chenyanwei,

You can write 

javascript: gs.getUser().email;

 

View solution in original post

6 REPLIES 6

Monika2
Giga Guru

Hello,

To set the field value dynamically when the form is loaded you can write display business rule with below script:

current.your_field_name = gs.getUser().getEmail();

 

Shafiuddin Shai
Tera Contributor

how can i get the name as default value instead of email