Filtering Assets by Company in a Work Order Task (WOT) in ServiceNow and Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 07:50 AM
When I have a user with visibility to three domains, upon accessing a Work Order Task (WOT), it lists the assets from all three domains. However, I need it to only list the active records that belong to the WOT’s company.
In the WOT form, I adjusted the asset reference field dictionary to have Dependent Field: company. Additionally, I used an Advanced Reference Qualifier to ensure that the assets listed are filtered based on the WOT’s company using the following Script Include:
When I am on the ServiceNow form, this works as expected, executing the Script Include and filtering the data correctly. However, when I use it on Agent, it fails to filter the assets by the WOT’s company.
Below is my current sys_sg_input configuration:
I attempted to use a condition to specify the filter value, but `current` does not exist in this context, so it returns empty:
Do you have any idea how I can filter assets by company in a sys_sg_input?