MoveAsChildByName method: Node class
Syntax
MoveAsChildByName(NodeName)
Description
The MoveAsChildByName method moves the node executing the method to a different node in the tree. The node becomes the first child node under the parent node. The specified node becomes the new parent to the node. The node specified by NodeName must be a valid node name. All child nodes and details are also moved with the node.
Parameters
| Parameter | Description |
|---|---|
|
NodeName |
Specify the name of a node. This parameter takes a string value. NodeName must be a valid node for the existing tree. |
Note:
To specify a node object, not a node name, use the MoveAsChild method.
Returns
A number; 0 if method is successful.
Example
The following moves node 10200 from node 10100 (old parent) to node 00001 (new parent)
&MY_NODE = &MY_TREE.FindNode("10200", "");
If &MY_NODE <> Null Then
&MY_NODE.MoveAsChildByName("00001");
End-If;
Related Topics