• 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

    pointValueBefore is not working and it was working so wondering what might be going on?

    User help
    2
    3
    963
    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
      Phillip Weeks
      last edited by

      Wondering why this code is producing the same values with data that has unique values. I use.pointValueBefore to get the previous value for comparison and the function seems to have stopped working.

      0_1575736076094_a7b6b31f-9637-479a-ba91-cb09abbaf0ea-image.png

      print( KW.pointValueBefore(KW.time).value);
      print(KW.value);

      Success. result=Success, no new value, timestamp=12:53:54
      6620.0
      6620

      both produce the same result value so what is going on here?

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

        Further to that I recursed one more level to successfully fetch the previous value. So what is going on that I have to do it twice to see the increment. I understood this function would return the value directly before the time passed in?

        var KWBF1 = KW.pointValueBefore(KW.time);
        var KWBF2= KW.pointValueBefore(KWBF1.time);
        print(KWBF1.value);
        print(KWBF2.value);
        print(KW.pointValueBefore(KW.time).value);
        print(KW.value);

        Success. result=Success, no new value, timestamp=13:09:36
        6622.0
        6621.0
        6622.0
        6622

        1 Reply Last reply Reply Quote 0
        • terrypackerT
          terrypacker
          last edited by terrypacker

          @Phillip-Weeks just a little more info would be helpful for me to pinpoint the Mango code in question.

          1. Are you using NoSQL?
          2. What is this script from? Context point in a script?
          3. Where is the script? Meta point, Excel Report...

          I did a quick check of our database queries and they are correct. I can't see the data you are referring to in the image as that is only a window for times that are not in your test.

          Also its nice to put a code block around code as it makes it easier to read.

          Thanks.

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