FindLeaf method: Tree class
Syntax
FindLeaf(RangeFrom, RangeTo)
Description
The FindLeaf method finds an existing leaf (specified by the range parameters) in the tree executing this method. If the leaf is found, a leaf object is returned. If the leaf isn’t found, a Null is returned.
You can use wildcards with the range parameters. Use an asterisk (*) in place of a number of characters. Use a question mark (?) in place of one character. You can also provide one of the ranges, and specify a Null string for the other.
Suppose you wanted to find the leaf with the range 81005 to 82000. The following would be valid:
&MyLeaf = &MyTree.FindLeaf("81*", "82000");
This would also be valid:
&MyLeaf = &MyTree.FindLeaf("8100?", "82000");
You could also specify this:
&MYLEAF = &MYTREE.FindLeaf("81000", "");
If you specify the exact same value for both RangeFrom and RangeTo, the RangeTo parameter is ignored.
Parameters
| Parameter | Description |
|---|---|
|
RangeFrom |
Specify the starting range of the leaf to be found. This parameter takes a string value. |
|
RangeTo |
Specify the ending range of the leaf to be found. This parameter takes a string value. |
Returns
A reference to a leaf object.
Example
&MYLEAF = &MYTREE.FindLeaf("81000", "");