OpenWholeTree method: Tree class
Syntax
OpenWholeTree(SetID, UserKeyValue, TreeName, EffDt)
Description
The OpenWholeTree method enables you to open a tree as if it were an unbranched tree. With this kind of tree, branched nodes cannot be distinguished from unbranched nodes. This means you can traverse the entire tree. It also means that branches have a node icon, not a branch icon. This method can be used only with a closed tree, it cannot be used on an open tree. You cannot read any properties of a tree until after you open it. This tree is always opened as read-only.
Note:
You can't open a tree using this method and update it. The tree is opened in read-only mode.
Parameters
| Parameter | Description |
|---|---|
|
SetID |
Specify the table indirection key for the tree. This parameter takes a string value. If the tree structure the tree is based on has its IndirectionMethod specified as "S", you must specify a SetID. If the tree structure doesn’t have its IndirectionMethod specified as "S", you must enter a Null string (that is, two quotation marks with no blank space between them ("")) for this parameter. |
|
UserKeyValue |
Specify the User Key value for the tree. This parameter takes a string value. If the tree structure the tree is based on has its IndirectionMethod specified as "U" or "B", you must specify a User Key Value. If the tree structure doesn’t have its IndirectionMethod specified as "U" or "B", you must enter a Null string (that is, two quotation marks with no blank space between them ("")) for this parameter. |
|
TreeName |
Specify the name for the tree. This parameter takes a string value. |
|
EffDt |
Specify the effective date for the tree. This parameter takes a string value. The format must be in the correct format for the database platform the code is executing on. |
Returns
An integer: 0 if opened successfully.
Example
&pSession = %Session;
&pTreeObj = &pSession.GetTree();
&status = &pTreeObj.OpenWholeTree(&Setid, &SetCntrlValue, &TreeName, String(&Eff⇒
Dt));