Auto populate info on catalog item form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2022 08:37 PM
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.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 12:30 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 01:49 AM
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
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader