TreeLocksNumber method: Tree class

Syntax

TreeLocksNumber(setID, UserKeyValue, TreeName, EffDt)

Description

Use the TreeLocksNumber method to determine how many users have checked out any branches of a current tree. This method should be used to check if a tree definition could be changed without affecting other users working in different branches of a tree.

Note:

In order to use this method, you must have Tree multi-user environment enabled. You can check if it is enabled by using UseUpdateReservation Tree property.

You can use the TreeLocksNumber method with a both an open as well as a closed tree.

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 this tree. This parameter takes a string value.

EffDt

Specify the effective date for this tree. This parameter takes a string value.

Returns

The number of locked branches. If the tree is not branched, but is checked out, the return value is 1.