31 May 2023 03:03 PM - edited 31 May 2023 03:03 PM
fetch dt.entity.host_group | filter in(id,[fetch dt.entity.host |filter matchesValue(tags,"MyTag")|fields id])
Do I need a FilterIn, a Lookup, etc?
Solved! Go to Solution.
01 Jun 2023 08:01 AM - last edited on 19 Jun 2023 10:27 AM by sinisa_zubic
lookup
and then do a filter. Please try following DQL:fetch dt.entity.host_group
| lookup [fetch dt.entity.host
| filter matchesPhrase(tags,"MyTag")
| fieldsAdd hostGroupReference = instance_of[dt.entity.host_group]], sourceField:id, lookupField:hostGroupReference
| filter isNotNull(lookup.id)
| fieldsRemove "lookup*"
instance_of[dt.entity.host_group]
lookup.id
. Basically filter only those host groups which have match from the lookup