IQL to check the object type of an attribute value

mvdetten January 10, 2020

Hi community!

I have a quick IQL question that I could not find an answer for as of yet:

I have two Insight object types DEVICE and CONTRACT. A device can have many contracts and stores them in the attribute device.contracts. In addition CONTRACT has two sub types CONTRACTA und CONTRACTB. Now I want to filter all objects to only return objects that have contracts of type B.

So I guess I would need some IQL like "contracts IS NOT empty AND contracts.objectType = CONTRACTB". Unfortunately it doesn't work that way. Can anyone help me?

Cheers,

Markus

1 answer

1 accepted

0 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2020

Hi @mvdetten ,

please look at function inbound/outboundReferences.

Your IQL could look something like this: 

objectType = DEVICE AND object HAVING outboundReferences(objectType IN ("CONTRACTB"))
mvdetten January 10, 2020

Oh right! I always have difficulty wrapping my head around the inR and outR functions. But that worked.

Thanks for the quick reply!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events