Reference field need to populate based on Subject person and HR service in HR case creation page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 12:12 PM
On HR case creation page, there is custom reference field - 'Request subcategory' which refer to custom tables 'Global Request subcategories' table, which stores subcategory mapped based on Subject person's country and the associated HR service's Record producer.
In case creation form on selection of subject person and Hr service, this subcategory field should dynamically populate only those filtered record that matched the selected country and record producer.
I have written client script to get the value of subject person and HR service from case creation form and script include to get the multiple sys id of subcategories from global request subcategories table. but unable to set those sysid in request subcategory reference field.
And when i am trying to take input in reference qualifier instead of client script, then it's not getting the current selected Hr service and subject person.
Please support here.
@Ankur Bawiskar - Can you support in this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 08:38 PM
please share screenshots.
if you are talking about HR Case Creation page then from native or workspace you are checking?
Also that's OOTB UI page for native. why to change that?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 01:07 AM
Hello @Ankur Bawiskar
Hello Ankur
Yes I am updating in agent workspace.
Not changing in oob case creation ui page script.
We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.
I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.
If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this tow parameter in script include, but it’s not getting any value.
javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);
Can you please check and update here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 01:13 AM
Hello @Ankur Bawiskar
Yes I am updating in agent workspace.
Not changing in oob case creation ui page script.
We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.
I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.
If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this two parameter in script include, but it’s not taking the user selected value from form.
javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);
Can you please check and update here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 05:46 AM
Hello @Ankur Bawiskar
Yes I am updating in agent workspace.
Not changing in oob case creation ui page script.
We have dependency on request subcategory on assignment rules. Although end user will raise case through frontend portal. But through virtual agent, hr agent may raise case through agent workspace. In this scenario this will be challenged.
I have tried both with on change client script and reference qualifier on this field. But it seems something is missing.
If from client script, we cannot set multiple sysid, then can you suggest how to take input from case creation page in reference qualifier advance script. I am using below script and passing this two parameter in script include, but it’s not taking the user selected value from form.
javascript: new GetRequestSubcategoryFilter().getSubcategoryIds(current.hr_service, current.subject_person);
Can you please check and update here.