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.
Is there a way to assign a point an alias or "human readable name"?
-
I'm working on templatizing a solution to something I'm working on and basically the end result will be that I gather several different parameters, calculate one single final value and display that to the user. I have a naming convention for all my points which makes it easy to bulk edit and keep things straight, but it's not very human readable, it'll be something like prefix/site_number/reading/units. It would be super helpful if I could assign something like a second name to the point such as 245 Street Dr kWh Consumption
Anything like that exist by any chance?
-
I guess I could use the export ID as the naming convention and name would be human name
-
@psysak said in Is there a way to assign a point an alias or "human readable name"?:
I guess I could use the export ID as the naming convention and name would be human name
I definitely think that's the way to go about it, and then you can do things in a script like...
var dataPoints = DataPointQuery.query('like(xid,prefix/site_number%)'); //then iterate over the list, get the dataPoint.runtime object to use it like a context variable if not null
-
Hopeless humans, how will they ever survive :)
This brings up an interesting point, is there such as thing as a debug window for the scripting? Like something I could use to monitor the values of my variables? Right now when I'm doing scripting and I need to see something I'll put a RETURN var; at the top of my script just to see what it spews out. Any way to see the values of all variables at once?
Thanks Phil
-
Have you used the print() function? You can also use LOG if you want it to go out to a file. See the Mango JavaScript help document for information about LOG: https://help.infiniteautomation.com/about-mango-java-script/
print(contextPoint.getDataPointWrapper().getExtendedName() + " has value " + contextPoint.value + " at time " + contextPoint.time); //note that if you got it from DataPointQuery, it would be... print(contextPoint.getExtendedName() + " has value " + contextPoint.runtime.value + " at time " + contextPoint.runtime.time);
-
@psysak The good news is that data point tagging will be coming soon (v3.3.0) for the very reason you have described.
-
@jared-wiltshire said in Is there a way to assign a point an alias or "human readable name"?:
@psysak The good news is that data point tagging will be coming soon (v3.3.0) for the very reason you have described.
Very cool!