RootValue

(Engine-Level Function)

Description: Retrieves the root value from a dictionary. This function will always attempt to return a value that is not itself a dictionary. If the value stored as the root of the given dictionary is also a dictionary, this function will return the root value from that second dictionary. Should all root values be other dictionaries (which would imply that the dictionary at the end of the chain must actually be an earlier dictionary) then RootValue will traverse the chain until it finds a root value which is an earlier dictionary (i.e. the end of the chain before it loops back) and will return that root value. This is the only situation where the command will return a dictionary as the result.
Returns: Varies
Usage: Script or steady state.
Function Groups: Dictionary,  Variable
Related to:
Format: RootValue( dictionary );
Parameters: Dictionary | MetaData | DictionaryCopy | DictionaryRemove | GetNextKey | GetKeyCount | HasMetaData | IsDictionary | ListKeys
Dictionary
Required. The name of the dictionary to find the root value of.

Example:

RVAL == 5;

Note:  You can always access the root value of a dictionary directly using the syntax Y  =  X[ "" ]. This technique will not follow links to other dictionaries and will always return the root value of the requested dictionary, even if that value is another dictionary.