User Tools

Site Tools


find_super_fix_multi_value_symbols_.htm

The page for #FIND was missing. Carl did a quick copy/paste from Help and some formatting


#FIND( symbol, fixsymbol [,limit] ) [, NOCASE]

blk2blue.jpg

#FIND FIXes all multi-valued parent symbols to values that point to a single child instance.
symbol A multi-valued symbol.
fixsymbol A symbol or expression containing the value to fix the symbol to.
limit A parent symbol which limits the search scope to the children of the limit symbol.
NOCASE The fixsymbol value case does not need to match the case of the 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.

Example:

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

See Also: #SELECT ,#FIX

find_super_fix_multi_value_symbols_.htm.txt · Last modified: 2023/08/09 05:52 by carlbarnes