GetToken (Control Lock Module)

(Control Token Manager)

This function works with Control Tokens. If you are interested in stream handling refer to GetToken

Description: Checks if a token is applied directly to a tag or (optionally) to a tag's ancestor. Can also search for token requests.
Returns: A token record, token request record or an array of token records or token request records. (Invalid if no token is found.)
Usage: Script or steady state.
Function Groups:

(Control Token Manager)

Related to:

CanControl (Control Token Manager) | CanDenyTokenRequest | CanGrantTokenRequest | CanReleaseToken | CanRequestToken | DenyTokenRequest | GetToken (Control Lock Module) | GetTokenLevel | GrantTokenRequest | ReleaseToken | RequestToken |

Format: \ControlTokenManager.GetToken(TagID[, IncludeAncestry, Snapshot, GetRequest, ReturnAll])
Parameters:  
TagID
Required text. The unique ID of the tag to check.
IncludeAncestry
Optional Boolean. Set TRUE to search the tag's ancestry. Defaults to TRUE.
Snapshot
Optional Boolean. Set TRUE if this function is called in script. Defaults to FALSE.
GetRequest
Optional Boolean. Set TRUE to search the TokenRequests list instead of the Tokens list. Defaults to FALSE.
ReturnAll
Optional Boolean. Set TRUE to return all matching records. Defaults to FALSE.
 
 
Comments:

Given a tag's unique ID, this module checks if a token is applied directly to the tag (IncludeAncestry = FALSE).

If IncludeAncestry = TRUE (default), this will search the tag's ancestry for the nearest token. Returns Invalid if no token is found.

Can optionally search the TokenRequests list instead if GetRequest = TRUE