- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2020 04:50 AM
This is the first custom application attempted.
I would like to auto populate the value from the User [sys_user] department field, but I'm not quite sure how to do that. (Refer to attached screen print) I was able to successfully auto populate the Requestor field, but am having trouble with the Department field.
Perhaps the missing link for me is that I must somehow associate the Department field value with the Requestor's User ID. Unfortunately, I'm not sure how to do that.
So, I appreciate any help which can be provided!
Solved! Go to Solution.
- Labels:
-
User Experience and Design

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 05:28 AM
Taking the Incident form lay-out as example. You could add the field doltwalked like:
If I now select a User which has a Department, like on my PDI "HR" is my department, automatically the Department is shown:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2020 04:54 AM
Hi there,
Should this happen onChange? Or after saving the form?
An option might be to display the dotwalked department from the sys_user, on your form.
An other option, if onChange, have a look at applying GlideAjax within a Client Script in combination with a Script Include. You could also use other techniques like getReference, though GlideAjax (with getXMLAnswer) performs by far best.
See below article which contains detailed explanation and examples:
Client Side Scripting: Go for GlideAjax (with getXMLAnswer)!
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 05:22 AM
Mark, I envisioned this happening when the form is loaded based on the department of the Requestor. Also, I do not expect the Requestor to change since it is the person who is logged in.
I'm not quite sure how to display the dotwalked department from the sys_user, on your form

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 05:28 AM
Taking the Incident form lay-out as example. You could add the field doltwalked like:
If I now select a User which has a Department, like on my PDI "HR" is my department, automatically the Department is shown:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2020 07:06 AM
Mark, I was able to easily utilize the dotwalking functionality to populate the Department field based on your guidance. Thank you!