Difference between revisions of "NXSL:GetNodeParents"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ Get accessible parent objects for given node. == Syntax == GetNodeParents(''node''); == Parameters == :{| |- | ''node'' || Node object. Predefine...")
 
m
Line 13: Line 13:
|-
|-
| ''node'' || [[NXSL:Node|Node]] object. Predefined variable '''$node''' can be used to refer to current node in transformation script or event processing policy rule.
| ''node'' || [[NXSL:Node|Node]] object. Predefined variable '''$node''' can be used to refer to current node in transformation script or event processing policy rule.
|-
| ''id'' || DCI ID.
|}
|}



Revision as of 13:17, 8 June 2012

Get accessible parent objects for given node.


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. This function will never return template or policy objects applied to node. Return value also affected by trusted nodes settings (see Security Issues for more information).


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);
}