Skip to main content
Solved

NQE for matching agains device.Tagnames

  • Jul 15, 2025 4:46 PM UTC
  • 4 replies
  • 156 views
  • Translate All

Forum|alt.badge.img+2

Hello:

   Hopefully this isnt a repeat as i couldn’t find the answer on here so I wanted to post it.  im trying to match against “tags” within  the application, and everything I am tying, regarding the ‘where matches” command is used, isnt working.  This is in the regular inventory so i have the statement “foreach device in network.devices” list as well above where i think the match line should go.  I can it list the tags, just not match/filter on tags.

Best answer by RobertWelch

Try this…


foreach tag in device.tagNames

where tag == "MYTAG"

View original

4 replies

RobertWelch
Spotter
Forum|alt.badge.img+1
  • Spotter
  • Answer
  • Jul 15, 2025 4:50 PM UTC

Try this…


foreach tag in device.tagNames

where tag == "MYTAG"

Translate

Forum|alt.badge.img+2
  • Author
  • Spotter
  • Jul 15, 2025 4:55 PM UTC

Well if i didnt over thing that one...thank you kindly as it worked.

Translate

RobertWelch
Spotter
Forum|alt.badge.img+1

NP.  Don’t forget that there are some wonderful examples in the right side Data Model examples.  Use the search bar at the top.  Although in this case, the “where” is the key.  
Keep the questions coming.  Others lean by asking as well.  

Translate

cariddir
Spotter
Forum|alt.badge.img+5
  • Spotter
  • Sep 16, 2025 4:34 PM UTC

Also, you combine easily -
where "Network" in device.tagNames && "Router" in device.tagNames
to further filter.

Translate