Difference between revisions of "NXSL:GetNodeParents"
m (Text replacement - "^" to "{{deprecated}}") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | {{deprecated}}__NOTOC__ | ||
Get accessible parent objects for given node. | Get accessible parent objects for given node. | ||
Line 19: | Line 19: | ||
== Return Value == | == Return Value == | ||
Array of objects of class [[NXSL:NetObj|NetObj]] (generic NetXMS object), with first object placed at index 0. End of list indicated by array element with null value. | Array of objects of class [[NXSL:NetObj|NetObj]] (generic NetXMS object), with first object placed at index 0. End of list indicated by array element with null value. Return value also affected by trusted nodes settings (see [[SG:Security Issues|Security Issues]] for more information).<br><br> | ||
This function will never return template or policy objects applied to node. | |||
Objects of these types will be returned:<br> | |||
OBJECT_CONTAINER<br> | |||
OBJECT_CLUSTER<br> | |||
OBJECT_SUBNET<br> | |||
OBJECT_SERVICEROOT<br> | |||
Latest revision as of 16:13, 13 September 2022
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide) |
Get accessible parent objects for given node.
Since: 1.0.8
Syntax
GetNodeParents(node);
Parameters
node Node object. Predefined variable $node can be used to refer to current node in transformation script or event processing policy rule.
Return Value
Array of objects of class NetObj (generic NetXMS object), with first object placed at index 0. End of list indicated by array element with null value. Return value also affected by trusted nodes settings (see Security Issues for more information).
This function will never return template or policy objects applied to node.
Objects of these types will be returned:
OBJECT_CONTAINER
OBJECT_CLUSTER
OBJECT_SUBNET
OBJECT_SERVICEROOT
Examples
// Log names and ids of all accessible parents for current node
parents = GetNodeParents($node);
foreach(p : parents)
{
trace(1, "Parent object: name='" . p->name . "' id=" . p->id);
}