• 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.0k
    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.
    • R
      RonnyHinkel
      last edited by

      Hi mattfox

      yes thats works, but looks like the listing is updating real time, is there a ng-option to false the real time?

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

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • R
          RonnyHinkel
          last edited by RonnyHinkel

          @MattFox

          <ma-point-values point-xid="DP_7e9b56ef-578c-4a0a-96bc-289a29ccc37b" values="serials" latest="100"></ma-point-values>
          
          <md-select ng-model="serialID">
          <md-option ng-repeat="serial in serials" ng-value={{serial.value}} ng-realtime="false">{{serial.value}}</md-option>
          </md-select>
          Chosen Serial: {{serialID}}
          <br>
          Start Time: {{serialID.minimum.timestamp | maMoment:'format':'lll'}}
          <br>
          Finished Time: {{serialID.maximum.timestamp | maMoment:'format':'lll'}}
          

          unfortunately is updating in real and after a short time the all values wold be the latest value (same values).
          also the from- to timestamp would be important for all other values to follow as a page rollup

          thank you for help and support

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

            @mattfox

            <md-select ng-model="serialID" ng-required="true" ng-change="callOnChange()" >
            <md-option ng-repeat="serial in serials" ng-value="{{serial.value}}" > {{serial.value}} </md-option>
            </md-select>
            
             <ma-point-statistics point-xid="DP_7e9b56ef-578c-4a0a-96bc-289a29ccc37b" from='serialID' to='(serialID+1)' statistics="Ring"></ma-point-statistics>
            

            if i would like to use the SerialID with a MA-point-statistics as a from- to, how i could include those values?
            Sorry, really trying since days and have no conclusion yet.

            Thank you for giving me some help!!!

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

              Whoa slow down!
              Ok so first we have your latest batch of serials. You can set realtime="false" in the ma-point-values so that it doesn't update via the web socket.
              Secondly, now you want to use the serials as a means of timestamp?
              Looks like more information is required.
              Use to and from with dates to make that happen. I'll look when I'm near a pc what you can use to tie it to the dateBar. However I will need more info from you first as to what you intend the "big picture" to be since the list here appears to be growing.

              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
                Hi Mattfox
                what i'm trying to do is a production report based on serial numbers. for this we have the selection of the serial number. After selection of the serial number, there is a start and end time for each serial number, which i would like to use for every datapoint at this page.

                <md-select ng-model="serialID" ng-required="true" ng-change="callOnChange()" >
                <md-option ng-repeat="serial in serials" ng-value="{{serial.value}}" > {{serial.value}} </md-option>
                </md-select>
                
                
                <ma-point-values point-xid="DP_bf4e8b98-ff25-439c-a63e-4af21bc92902" point="point1" values="point1Values" from="serialID.first.timestamp" to="serialID.last.timestamp" >
                </ma-point-values>
                
                1 Reply Last reply Reply Quote 0
                • MattFoxM
                  MattFox
                  last edited by

                  First up, what does serialID look like in the dashboard by itself
                  just enter the {{serialID}} into the dashboard markup and show me what the actual value looks like.

                  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

                    0_1595302200187_Screenshot 2020-07-21 at 11.29.40.png

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

                      @MattFox
                      0_1595302363307_Screenshot 2020-07-21 at 11.32.08.png

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

                        Ok, for a start, that's just a single number. It's not a javascript object so you can't use that dotted object notation.
                        Let's look at the raw data coming from the serials values, if it's anything like this:
                        [ {timestamp:1539247293,value:3}] the approach will have to be changed.

                        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
                        • MattFoxM
                          MattFox
                          last edited by

                          Yep, I think you need to look at changing your format. You need the timestamps as your values.
                          You also need to establish what your start and end times are per each serial. The timestamp by itself won't be enough unless you know you can comfortably add an additional hour for the to attribute or subtract for the from attribute...

                          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

                            the timestamp would be from Serial number to Serial Number+1

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

                              Then what do you do when you use the latest serial number? Go from that timestamp to now?

                              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
                                yes you're correct

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

                                  @ronnyhinkel said in Dropdown selection for datapoint values:

                                  ng-change="callOnChange()"

                                  ng-change="callOnChange()"
                                  Are you writing your own controller?

                                  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
                                    no thats just a left over from trying, sorry about that

                                    1 Reply Last reply Reply Quote 0
                                    • 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