• 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

    Dropdown selection for datapoint values

    User help
    2
    23
    7.6k
    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.
    • MattFoxM
      MattFox
      last edited by MattFox

      Ok, I'm gonna be clever...

      <md-select ng-model="serialID" ng-required="true" >
      <md-option ng-repeat="(index,serial) in serials" ng-value="index" > {{serial.value}} </md-option>
      </md-select>
      
      <div ng-if="serialID==(serials.length-1)">
      <ma-now update-interval="15 MINUTES" output="time"></ma-now>
      <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serials[serialID].timestamp" to="time" ></ma-point-values>
      </div>
      
      <div ng-if="serialID<(serials.length-1)">
      <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serials[serialID].timestamp" to="serials[(serialID+1)].timestamp" ></ma-point-values>
      
      </div>
      

      Using Ng-if will create these elements provided one of the if statements are met. Using the index allows us to make this list grow wholly depending on the number of your serials. If you're on the last serial, it sees we're using the last index and thus uses a ma-now directive to give us the browser time from the serial creation time!

      Fox

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

      R 1 Reply Last reply Reply Quote 0
      • R
        RonnyHinkel @MattFox
        last edited by

        @mattfox
        Perfect thats working for me

        Thank you very much Mattfox

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

          You're welcome, sorry for the lack of comments. Let me know if there's anything you don't understand after comparing it with the angularJS docs

          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