In the end the point data wasn't going to help me as I was hoping to get its hierarchical info. Guess I will need to query for that data.
You mean the point hierarchy information? You could get this through the DataPointWrapper easily.
var dpPath = p.getDataPointWrapper().getPath();
You can also get the point folder id or the data type id from the DataPointVO,
var folderId = CONTEXT_POINTS.p.getVO().getPointFolderId();
var dataTypeId = CONTEXT_POINTS.p.getVO().getPointLocator().getDataTypeId();
(The intention was if the setpoint associated to the alarm was set to -1, get the setpoint of the group it's in instead)
As far as grouping, I would use tags instead of the point hierarchy.
use an RQL query consisting of each of your points, I believe this may give you the nuts and bones data about storage and pointLocator types etc... This may be what you need to leverage that info...
This would certainly work if one is more comfortable using the JSON than going through the
DataPointQuery object to get a list of DataPointWrapper objects (so if they're enabled, their
.getRuntime() method returns what a normal context point is). So,
var queriedPoints = DataPointQuery.query(rql); //also has byXid method
//Let's just assume there's at least one for this example, and it's enabled,
print( queriedPoints.getRuntime() ); // should be the same as print(p) if p is a context point