Difference between revisions of "NXSL:FindNodeObject"
Jump to navigation
Jump to search
(Created page with "__NOTOC__ Find node object by node id or node name. == Syntax == FindNodeObject(''node'', ''id''); == Parameters == :{| |- | ''node'' || Node object, you can use predefi...") |
m (Text replacement - "^" to "{{deprecated}}") |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | {{deprecated}}__NOTOC__ | ||
Find node object by node id or node name. | Find node object by node id or node name. | ||
Line 12: | Line 12: | ||
:{| | :{| | ||
|- | |- | ||
| ''node'' || Node object, you can use predefined variable $node to refer to current node. You can also use null as node if trusted nodes check is disabled (see | | ''node'' || [[NXSL:Node|Node]] object, you can use predefined variable $node to refer to current node. You can also use null as node if trusted nodes check is disabled (see [[SG:Security Issues|Security Issues]] for more information). | ||
|- | |- | ||
| ''id'' || ID or name of the node to find. | | ''id'' || ID or name of the node to find. | ||
Line 20: | Line 20: | ||
== Return Value == | == Return Value == | ||
Node object with given id or name on success or '''null''' on failure (either because node with given name/id does not exist, or access to it was denied) | [[NXSL:Node|Node]] object with given id or name on success or '''null''' on failure (either because node with given name/id does not exist, or access to it was denied). | ||
Latest revision as of 18:13, 13 September 2022
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide) |
Find node object by node id or node name.
Syntax
FindNodeObject(node, id);
Parameters
node Node object, you can use predefined variable $node to refer to current node. You can also use null as node if trusted nodes check is disabled (see Security Issues for more information). id ID or name of the node to find.
Return Value
Node object with given id or name on success or null on failure (either because node with given name/id does not exist, or access to it was denied).
Examples
FindNodeObject($node, "server.netxms.org") -> object FindNodeObject(null, 12) -> object FindNodeObject($node, "bad_node_name") -> NULL