dynamic watchlist query with parameter variable - no results but LITERAL Works???
-
Setup a device parameter dn to hold the value.
devicename parameter list shows up correctly and the preview allows me to select a device as a parameter,however it appears the query cannot see the variable {{dn.name}} because it returns no records when trying to match the parameter
(deviceName,{{dn.name}})&sort(deviceName,name)&limit(200)
YET when selecting records devicename > {{dn.name}} as so
gt(deviceName,{{dn.name}})&sort(deviceName,name)&limit(200)
returns all records because {{dn.name}} is nothing I'm guessing?
When I type in a LITERAL like:
eq(deviceName,1-71-101)&sort(deviceName,name)&limit(200)
I get the 1 correct result so it appears to be a variable scope issue...QUERY PREVIEW (1)
Any clues on what is happening?
-
@phillip-weeks Latest UI 3.2.10 Confusing watchlist behaviour ...
take the RQL straight from a working watchlist query
or(eq(deviceName,{{UnitNumber}})) THIS WORKS and returns 47 records.
Make a new Watchlist and drop this RQL query with the exact same working parameter list and default parameter.
It returns no values
The same RQL works perfectly in the orignal watchlist??
even modifying it in the original watchlist still returns records.new watchlists being created with a parameter don't work
yet replace var with a LITERAL in the query and it works returning correct records. -
would need more of your html to see what you are doing, but do note you can use
<ma-point-query query="'like(deviceName,'+dn.name+'*)&sort(deviceName,name)&limit(200)'"></ma-point-query>the * will enable you to use a wildcard surrounding your search term in a like() query.
Hope this is a startFox