We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Auto populate info on catalog item form

Balaji Ramanath
Kilo Contributor

Hi,

I am a newbie to catalog item form configuration and the below areas holding me to complete the form. 

1. Variable set - Reporting User Email/(would like to auto populate based on reporting user name from user table) - I have given the default value for 'Reporting User Email' as 'javascript:gs.getUser().getRecord().getValue('email');' but it still shows empty on the form. 

2. Variables - Affected User Name / Affected User Department - would like to auto-populate the user department info from the user table upon selecting the 'Affected user name'. 

Thanks. 

11 REPLIES 11

Hi,

The default value population is sorted now. I can see the values auto-populated up on the logged-in users. 

Please suggest how to populate, these highlighted fields in the service portal form. PFA

I just need to populate the Affected user department info upon selects the 'Affected user name'. Kindly suggest. 

Thanks for your time. 

 

Hi,

I think you didn't check my response given 4 hours ago

share script include script

also line 13 is incorrect because of this AffectedUser.Department

you are splitting the answer with | but not using the array element

find_real_file.png

Regards
Ankur

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