FMLFOR: Retrieving FML Tag Values

How to:

Available Languages: reporting

FMLFOR retrieves the tag value associated with each row in an FML request. If the FML row was generated as a sum of data records using the OR phrase, FMLFOR returns the first value specified in the list. If the OR phrase was generated by an FML Hierarchy ADD command, FMLFOR returns the tag value associated with the parent specified in the ADD command.

The FMLFOR function is supported for COMPUTE but not for DEFINE. Attempts to use it in a DEFINE result in blank values.

Syntax: How to Retrieve FML Tag Values

FMLFOR(output)

where:

output

Is name of the field that will contain the result, or the format of the output value enclosed in single quotation marks.

Example: Retrieving FML Tag Values With FMLFOR

SET FORMULTIPLE = ON
TABLE FILE LEDGER
SUM AMOUNT
COMPUTE RETURNEDFOR/A8 = FMLFOR('A8');
FOR ACCOUNT
1010                  OVER
1020                  OVER
1030                  OVER
BAR                   OVER
1030 OR 1020 OR 1010
END

The output is:

      AMOUNT  RETURNEDFOR 
      ------  ----------- 
1010   8,784  1010 
1020   4,494  1020 
1030   7,961  1030 
      ------  -------- 
1010  21,239  1030