#FIND ("super-fix" multi-value symbols) 

Top  Previous  Next


#FIND( symbol, fixsymbol [, limit ] )


FIXes all multi-valued parent symbols to values that point to a single child instance.


A multi-valued symbol.


A symbol or expression containing the value to fix the symbol to.


A parent symbol which limits the search scope to the children of the limit symbol.

The #FIND statement finds the first instance of the fixsymbol contained within the symbol then FIXes it and all the "parent" symbols on which the symbol is dependent to the values that "point to" the value of the fixsymbol contained in the symbol. This is done so that all the symbol dependencies are aligned and you can reference other symbols dependent on "parent" symbols of the symbol. (See #FIX)

For example, assume %ControlUse contains CUS:Name. The #FIND(%Field,%ControlUse) statement:


Finds the first instance of %Field that matches the current value in %ControlUse (the first instance of CUS:Name in %Field) in the current procedure.


FIXes %Field to that value (CUS:Name).


FIXes %File to the name of the file containing that field (Customer).


This allows the Template code to reference other the symbols dependent upon %File (like %FilePre to get the file's prefix).

The fixsymbol must contain a valid instance of one of the symbol's multiple values. If the fixsymbol does not contain a valid instance, the symbol is cleared and contains no value when referenced.


#FIND(%Field,%ControlUse)      #!FIXes %Field and %File to %ControlUse parents


See Also:     #SELECT ,#FIX