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.
pointValueBefore is not working and it was working so wondering what might be going on?
-
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.
print( KW.pointValueBefore(KW.time).value);
print(KW.value);Success. result=Success, no new value, timestamp=12:53:54
6620.0
6620both produce the same result value so what is going on here?
-
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 -
@Phillip-Weeks just a little more info would be helpful for me to pinpoint the Mango code in question.
- Are you using NoSQL?
- What is this script from? Context point in a script?
- 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.