Troubleshooting Outbound Reference IQL Query Issue in Post Functions
Problem
When using the provided IQL query with an outbound reference in a post function, the query does not return any results. However, the same query works successfully in the Assets object search. IQL query used in post function:
objectType = CPU AND object HAVING outboundReferences(objectType = "Servers" AND "Server" IN ${Affected Server})
Solution
To resolve this issue, it is necessary to re-construct the query and use a placeholder outside the outbound reference. Here is an updated version of the query:
objectType = CPU AND Server IN ${Affected Server} AND object HAVING outboundReferences(objectType = Servers)
Cause
The issue occurs because placeholders do not function as expected within outbound references in IQL queries used in post functions. This limitation affects the query's ability to retrieve the desired results.