#648 haystackReadAll filter using custom dictionary tags

Paul Quinn Mon 29 Oct 2018

Has anyone been successful using custom dictionary tags in the haystackReadAll filter?

I have a client with a supervisor that consolidates 50+ buildings. They aren't using the NHaystack palette to tag all sites and equips. They have a custom dictionary that tags buildings and equipment. I have import routines that automatically discovers equipment and points but due to the large number of histories on the supervisor I need to filter the results down to a single building at a time. The following function call returns an error because it doesn't like the : in the custom dictionary.

haystackReadAll(his and abc:building=="Building Code")

Do I need to use a special syntax to get around the colon (:) in the custom dictionary name? Is filtering on custom dictionary tags even supported in the haystackReadAll function? I would appreciate insight from anyone who has been successful filtering on custom tags.

Paul Quinn Fri 2 Nov 2018

I wanted to bump this conversation one more time.

Does the haystackReadAll() support custom tag dictionaries in the filter? Axon is rejecting the : in the custom tag. Is there a way I can escape the character so it will pass the request on to the Niagara Station?

axon::SyntaxErr: Expected ,, not : [eval:1]
axon::Parser.err (Parser.fan:688)
axon::Parser.err (Parser.fan)
axon::Parser.verify (Parser.fan:730)
axon::Parser.consume (Parser.fan:736)
axon::Parser.call (Parser.fan:516)
axon::Parser.termExpr (Parser.fan:431)
axon::Parser.termExpr (Parser.fan)
axon::Parser.unaryExpr (Parser.fan:416)
axon::Parser.multExpr (Parser.fan:399)
axon::Parser.addExpr (Parser.fan:383)
axon::Parser.rangeExpr (Parser.fan:368)
axon::Parser.compareExpr (Parser.fan:348)
axon::Parser.condAndExpr (Parser.fan:336)
axon::Parser.condOrExpr (Parser.fan:324)
axon::Parser.assignExpr (Parser.fan:312)
axon::Parser.expr (Parser.fan:81)
axon::Parser.parse (Parser.fan:38)
axon::AxonContext.parse (AxonContext.fan:67)
axon::AxonContext.parse (AxonContext.fan)
skyarcd::Context.evalOrReadAll (Context.fan:92)
skyarcd::SysLib.eval (SysLib.fan:91)
skyarcd::ApiWebMod.evalAllExpr (ApiMod.fan:295)
skyarcd::ApiWebMod.onEvalAll (ApiMod.fan:265)
fan.sys.List.each (List.java:588)

Brian Frank Sat 3 Nov 2018

The grammar for tag names does not allow a colon character to be used. And the Filter grammar then builds upon that. So your use of a colon isn't allowed by Haystack.

If Niagara is using a colon, then really they (Tridium and/or NHaystack) need to provide some solution that fits the Haystack grammar. One solution might be to allow underbar instead of a colon. Although preferably they should just allow querying with unqualified tag name which is the Haystack way of things.

Login or Signup to reply.