| Syntax |
|
| Documentation | Function $dropBranch drops the current branch and all of its children branches and subfolders.
a root branch (account) can not be removed. |
| Examples | |
Removing current branch:
$if{$hasAccess{ACCESS_DELETE}}
$// Get the id of the current branch. $set{branchID}{$getCurrent{b}} $//Remove all references of the current branch in the 'WordTable' table. $sql{delete * from WordTable where Branch=$get{branchID}} $//Remove all references of the current branch children in the 'WordTable' table. $forEach{id}{$getChildren{$get{branchID}}}
$sql{delete * from WordTable where Branch=$get{id}} } {$\ } {$getChildCount{1}} $//Remove the current branch. $dropBranch{} } |
|
| Group | Branch |
| Minimum required transaction-mode: | UPDATE=TREE |
| Required scripting permission of the developer | PERMISSION_FL_BASIC |
| Minimum parameters | 0 |
| Maximum parameters | 0 |