• 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

    Filtering the Menu list for the Angular JS, Graphs

    Dashboard Designer & Custom AngularJS Pages
    3
    11
    3.4k
    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.
    • A
      atkins.chrisw
      last edited by

      With this menu list provided by Mango. This grabs every point in the Mango DB. Is there a way I can filter this list to specific points, so I can make these lists for specific buildings or areas.

      <md-input-container class="md-block no-errors-spacer">
      <label>Choose a point</label>
      <ma-point-list ng-model="myPoint"></ma-point-list>
      </md-input-container>

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        Yes, please see the "Point list" example under "Basics". I'd recommend setting the "Device name" for each point to your building name, or implementing a specific point naming strategy that incorporates the building/area name.

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • A
          atkins.chrisw
          last edited by

          <div layout="column">
          <md-input-container class="md-block no-errors-spacer">
          <label>Choose a point</label>
          <ma-point-list ng-model="myPoint" query="deviceName(032 GAS East)"></ma-point-list>
          </md-input-container>

          <p>You have chosen point "{{myPoint.name}}". It is {{myPoint.enabled ? 'enabled' : 'disabled'}} and belongs to device {{myPoint.deviceName}}</p>
          
          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            I'm going to take it that you are asking why that markup isn't working?

            Pay close attention to the syntax of the query attribute, it should be query="{deviceName:'032 GAS East'}"

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • A
              atkins.chrisw
              last edited by

              Thanks Jared. Worked like a charm

              I'm loving this btw!!!

              1 Reply Last reply Reply Quote 0
              • A
                atkins.chrisw
                last edited by

                Jared,

                what if I wanted to make a variable reference to the query. That way, I could add in the top of my document a variable, that would then fill in the deviceName

                1 Reply Last reply Reply Quote 0
                • Will GellerW
                  Will Geller
                  last edited by Will Geller

                  It would be pretty similar to the example only set to query on deviceName:

                      <md-input-container>
                          <label>Set Variable for Device Name</label>
                          <input ng-model="deviceNameVariable" ng-model-options="{debounce:500}">
                      </md-input-container>
                  
                      <md-input-container>
                          <label>Filtered point list</label>
                          <ma-point-list limit="200" ng-model="myPoint2" query="{deviceName:deviceNameVariable}"></ma-point-list>
                      </md-input-container>
                  

                  In angular you can use ng-model or ng-init to declare scope variables without the var keyword.

                  With ng-init (you can move ng-init to a div at the top of the document)

                  
                      <md-input-container ng-init="deviceNameVariable='meta'">
                          <label>Filtered point list</label>
                          <ma-point-list limit="200" ng-model="myPoint2" query="{deviceName:deviceNameVariable}"></ma-point-list>
                      </md-input-container>
                  

                  Infinite Automation - UI Developer

                  1 Reply Last reply Reply Quote 0
                  • A
                    atkins.chrisw
                    last edited by

                    Thanks Jared. What If i wanted to filter y the datasource name instead of deviceName?

                    would it be {datasource: "UofU Stadium East'}

                    Jared WiltshireJ 1 Reply Last reply Reply Quote 0
                    • Jared WiltshireJ
                      Jared Wiltshire @atkins.chrisw
                      last edited by

                      @atkins.chrisw said in Filtering the Menu list for the Angular JS, Graphs:

                      Thanks Jared. What If i wanted to filter y the datasource name instead of deviceName?

                      would it be {datasource: "UofU Stadium East'}

                      It will be {dataSourceName: 'UofU Stadium East'}

                      Developer at Radix IoT

                      1 Reply Last reply Reply Quote 0
                      • A
                        atkins.chrisw
                        last edited by

                        Perfect. Worked great

                        1 Reply Last reply Reply Quote 0
                        • A
                          atkins.chrisw
                          last edited by

                          Also... What if I wanted to filter it between two different datasources with specific deviceNames?
                          ,

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