Bearbeiten

Freigeben über


CalcFormula Property

Version: Available or changed with runtime version 1.0.

Sets the Calculation formula for a FlowField. The following syntax is valid for the CalcFormula property:

CalcFormula =
[-]Exist(<DestinationTable> [WHERE (<TableFilters>)]) |
Count(<DestinationTable> [WHERE (<TableFilters>)]) |
[-]Sum(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)])|
[-]Average(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Min(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Max(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)]) |
Lookup(<DestinationTable>.<DestinationFieldName> [WHERE(<TableFilters>)])
<TableFilters> ::= <TableFilter> {,<TableFilter>}
<TableFilter> ::=
<DestinationFieldName> = CONST(<FieldConst>) | FILTER(<Filter>) | FIELD(<SourceFieldName>) | FIELD(UPPERLIMIT(<SourceFieldName>)) |
FIELD(FILTER(<SourceFieldName>)) | FIELD(UPPERLIMIT(FILTER(<SourceFieldName>)))

Applies to

  • Table field

Syntax

CalcFormula = Count(RecordCalcFields);

Remarks

Parts of the formula are described in the following table.

Symbol Description
<DestinationTable> Specifies the destination table holding the information to be used in the FlowField.
<DestinationFieldName> Specifies the destination field name.
<TableFilters> A list of filters to be used in the computation of the FlowField.
<TableFilter> A table filter can be one of the following: a constant expression, a filter expression, a value from ordinary fields, or a FlowFilter field. A key for the other table must exist and include the fields used in the filters.
<SourceFieldName> Specifies the source field name.
<Filter> A filter expression such as 10|20..30.

You can choose from several methods of calculations including sum (total), average, maximum value, minimum value, record count, lookup, and whether a record exists. For more information, see Creating FlowFields and FlowFilters, FlowFields overview, and FlowFilter overview.

Get Started with AL
Developing Extensions