Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

patriciomoy
Tera Expert

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:

 

PatricioJavier_2-1726238799209.png

 

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:

 

PatricioJavier_0-1726238195918.png

 

I attempted to use a condition to specify the filter value, but `current` does not exist in this context, so it returns empty:

 

PatricioJavier_3-1726238832893.png

 

 

Do you have any idea how I can filter assets by company in a sys_sg_input?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 REPLIES 0