• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    dynamic watchlist query with parameter variable - no results but LITERAL Works???

    Scheduled Pinned Locked Moved Dashboard Designer & Custom AngularJS Pages
    3 Posts 2 Posters 1.3k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      Phillip Weeks
      last edited by Phillip Weeks

      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?

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        Phillip Weeks @Phillip Weeks
        last edited by Phillip Weeks

        @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.

        1 Reply Last reply Reply Quote 0
        • MattFoxM Offline
          MattFox
          last edited by

          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 start

          Fox

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          1 Reply Last reply Reply Quote 0
          • First post
            Last post