FindNode method: Tree class
Syntax
FindNode(NodeName, Description)
Description
The FindNode method returns a reference to the node object specified by the parameters passed to the method. If the node is found, a node object is returned. If the node isn’t found, a Null is returned.
Note:
If you've only specified a node name, and the node you're searching for is in an unexpanded portion of the tree, this method expands the tree down to that node. If you've only specified a node description the search, occurs only in the memory. If the node isn't found, the tree is not expanded.
You should specify either the node name other description, not both. You should specify a Null string for the other. If both are provided, only the node name is used and the description is ignored.
You can use wildcards with the parameters. Use an asterisk (*) in place of a number of characters. Use a question mark (?) in place of one character.
Suppose you wanted to find the node called 10200, with a description of "Human Resources". The following would be valid:
&MyNode = &MyTree.FindNode("", "Human*");
This would also be valid:
&MyNode = &MyTree.FindNode("1020?", "");
You could also use the following:
&MYNODE = &MYTREE.FindNode("10200", "");
Note:
If you're searching using wildcard characters and more than one node matches the search conditions, only the first occurrence of the node is returned
Parameters
| Parameter | Description |
|---|---|
|
NodeName |
Specify the name of the node that you want to find. This parameter takes a string value. Specify either the node name or the description. |
|
Description |
Specify the description of the node that you want to find. This parameter takes a string value. Specify either the node name or the description. |
Returns
A reference to a node object.
Example
&MYNODE = &MYTREE.FindNode("10200", "");