Create a Function Filter

A function applies a calculation to groups of attribute values, then determines whether each calculated value poses a risk.

A function filter can group records on its own. Or, a standard filter can create a system-generated object, and the function filter can use the groups defined for that object. If a standard filter is to define groups, create it first, then create the function filter in an AND relationship with (below) the standard filter.

To create a function filter:

  1. In the Model Logic panel, expand the Add Filter option, then select Function. A dialog box appears. Enter a name for the filter in the Name field.

  2. In a Grouping Value line, use Object and Attribute fields to gather records into groups:

    • If the function filter is to create groups on its own, select a business object in the Object field. Then select one of its attributes in the Attribute field. In each group the function filter creates, values for that attribute match exactly.

    • If the function filter is to use a system-generated object, select the name of that object in the Object field. Then select one of its attributes in the Attribute field. This creates subgroups: records in each group defined by the system-generated object are further sorted on the values of the attribute you select.

  3. In a When line, use a Function field to select the calculation that's to be performed on grouped attribute values. Select among:

    • Average: Calculates the average of the attribute values.

    • Count: Determines how many attribute values exist.

    • Sum: Adds the attribute values together.

    • Rank: Arranges attribute values in ascending order. (A Display in Descending Order advanced option may reverse this order.)

    • Exclusive: Returns records of groups whose rows are missing any in a set of text strings that should belong together. (If you group records by expense report, for example, you can find expense reports that lack any in a set of complementary values, such as rental car but no gasoline expenses.)

    • Inclusive: Returns records of groups whose rows include all in a set of text strings that should not belong together. (If you group records by expense report, for example, you can find expense reports that contain conflicting values, for example gasoline purchases and taxi expenses.)

  4. For any function other than Count, select the attribute that provides values for the function to operate on. Use Object and Attribute fields in the When line to do this. (For the Inclusive or Exclusive function, only text attributes are available for you to select.)

    The Count function operates on the attribute you selected (in the Grouping Value line) to group records. It removes the option to select another object and attribute.

  5. In the remaining fields of the When line, select a condition and values that complete the condition.

    For the Inclusive and Exclusive functions, only the Matches any of condition is available. Specify values that should or shouldn't belong together. Use either a comma or a semicolon to delimit values. A full match isn't required. For example, "car" would return "rental_car."

    For the Rank and Count functions, the value must be a positive integer.

    For the Rank function, the condition and value specify one or more ranks, and the filter returns records at those ranks. For example, Equals 4 returns one record for each group, containing the fourth-ranking value of the attribute. Or, Less than 4 returns three records for each group, containing the first- through third-ranking values.

  6. Optionally, open the Advanced Options panel and select options that refine the attribute-condition formula you created.

An example: Group payables invoices by supplier, calculate the average payment to each supplier, and find average amounts that exceed a threshold.

  • To group records, use the Grouping Value line to select the Payables Invoice object and Supplier ID attribute.

  • To evaluate grouped records, use the When line to select the Average function. Then select the Payables Invoice object and its Amount attribute. Finally select the greater than condition and whatever value you want as a threshold.

A second example: Group payables invoices by supplier. Then identify suppliers that have generated large numbers of invoices.

  • To group records, use the Grouping Value line to select the Payables Invoice object and Supplier ID attribute.

  • To evaluate the grouped records, use the When line to select the Count function. The dialog refreshes so that the Object and Attribute fields disappear. Select the greater than condition and whatever value you want as a threshold. These selections apply to the Supplier ID attribute.