• 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

    How to query Value?

    User help
    2
    2
    436
    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.
    • seanS
      sean
      last edited by sean

      I got a question, code like this

      <md-input-container class="flex-auto" md-theme="default">
                                      <label>Card Number</label>
                                      <input type="text" ng-model="logQuery.mifareCardID" ng-model-options="{ debounce: 300 }">
                                  </md-input-container>
                                  <div flex></div>
                                  <md-input-container class="md-input-has-value flex-auto" md-theme="default">
                                      <label for="StartTime">Start Time</label>
                                      <ma-date-picker type="text" ng-click="showPicker($event)" name="startTime" ng-model="logQuery.startTime" mode="date" id="StartTime" aria-invalid="false" md-theme="mangoDark">
                                    </md-input-container>
                                  <md-input-container class="md-input-has-value flex-auto" md-theme="default" ng-if="logQuery.startTime">
                                      <label for="EndTime">End Time</label>
                                      <ma-date-picker type="text" ng-click="showPicker($event)" name="endTime" ng-model="logQuery.endTime" mode="date" id="EndTime" aria-invalid="false" md-theme="mangoDark">
                                  </md-input-container>
      
      
              <ma-now update-interval="1 SECONDS" output="time"></ma-now>
              <ma-point-query query="{$and: true, xid: '_Polling_accessCardID'}" points="doorAccessRecordPoints" />
              
              <ma-get-point-value points="doorAccessRecordPoints"></ma-get-point-value>
              <ma-point-values points="doorAccessRecordPoints" values="doorAccessRecordPointsValues" from="resultLogQuery.startTime || dateBar.from" to="resultLogQuery.endTime || dateBar.to" rollup="POINT_DEFAULT" rollup-interval="time"  use-cache="false"></ma-point-values>
      

      doorAccessRecordPointsValues like this:

      [
      {"timestamp":1701400999162,"value_XID_Door02_Polling_accessCardID":2022010448},
      {"timestamp":1701401016165,"value_XID_Door01_Polling_accessCardID":2022011364},
      {"timestamp":1701401021166,"value_XID_Door05_Polling_accessCardID":2022012507},
      {"timestamp":1701401065166,"value_XID_Door05_Polling_accessCardID":2022013115},
      {"timestamp":1701401083162,"value_XID_Door04_Polling_accessCardID":2022010273},
      {"timestamp":1701401085162,"value_XID_Door04_Polling_accessCardID":2022013232},
      {"timestamp":1701401132166,"value_XID_Door05_Polling_accessCardID":2022010170},
      {"timestamp":1701401179162,"value_XID_Door03_Polling_accessCardID":2022012796},
      ]
      

      I want to query value from use logQuery.mifareCardID to query doorAccessRecordPointsValues value is equal to logQuery.mifareCardID,
      how do I do ?

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

        @sean You cannot query values per se, that's not the intended purpose of a time series DB.
        One suggestion I have is generating values and filtering the output based upon the provided timeframe, the input field, and displaying those timestamps for those records entered.
        The other is having a dedicated virtual datasource of virtual points whose Xids align with the accessCardID numbers and updating the corresponding datapoint everytime that accessCardID is entered into the system...

        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