Autopopulating variables in record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 01:08 PM
Our team is creating a record producer that has a variable called "Subject Person" that is a reference to HR Profile. We also have another variable called "Work Schedule" that we're hoping to autopopulate with Full Time vs. Part Time based on the HR Profile that is chosen. Is there a way to autopopulate this variable from HR Profile based on the Subject Person that is selected?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 01:21 PM
Hi,
Yes. You'd want to create an onChange client script that triggers on the subject person field. When that triggers, it'll look up the user's record and bring back that data to place in that field. PLease see link for more details: https://community.servicenow.com/community?id=community_question&sys_id=5b73cf25dbd8dbc01dcaf3231f96...
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 01:21 PM
Do you want to auto-populate this field on the record producer, as soon as the subject person is selected (so on the Service Portal I suppose), or after the record producer has been submitted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 01:27 PM
preferably as soon as the subject person is selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 01:30 PM
Then you will indeed have to use a GlideAjax script include as Allen suggested.