Administering : Managing business rules and expressions : Business rules definitions : ListAttributeSum business rule
  
ListAttributeSum business rule
The ListAttributeSum business rule calculates the sum of a Float or Integer attribute for the elements in a Link List or Incoming Links attribute that are displayed in a view.
Note In Focal Point® 6.6, ListAttributeSum business rule is deprecated and replaced by the List business rule.
The sum is displayed in a business rule container attribute. When elements are updated so that the content of the view changes, the sum is automatically recalculated. You might use the ListAttributeSum business rule to complement the LinkListAttributeSum business rule. Do not use the ListAttributeSum business rule for Incoming Link attributes that only display links from views.
Prerequisites
In the source module, a Float or Integer attribute that contains the value that must be summed
A view from the source module that defines the rules for selecting the elements that the values are gathered from
A workspace member who has access to the specified view
A Link List or Incoming Links attribute in the target module that links to the source elements
In the target module, a business rule container attribute in which the sum is displayed. The attribute must be of type Text, Float, or Integer.
Format
In the business rule container attribute, type the business rule in the following format:
= ListAttributeSum("List Attribute ID","View ID",
"Attribute ID","User ID",'List Attribute Name',
"listen_to=Source Attribute Name",
"listen_to=View Rule Attribute Name")
Parameters
 
Parameter
Description
"List Attribute ID"
The ID of the target attribute, which is an incoming links or link list attribute. This attribute links to elements in the source module that contains the attribute to summarize.
"View ID"
The ID of the view that determines which elements to include in the calculation
"Attribute ID"
The ID of the source attribute to summarize
"User ID"
The global user ID of the member who has access to the view used for ListAttributeSum
'List Attribute Name'
The name of the target list attribute, which corresponds to the List Attribute ID
"listen_to"
Detects changes in a specified attribute. A listen_to parameter must be specified for the source attribute. Additional listen_to parameters are needed for each attribute in the source module that the view rules depend on.
See also
ListAttributeSum example
MailImport business rule
MatrixIRR business rule
MatrixNPV business rule
MatrixWriter business rule
SetChoice business rule
TrafficLight business rule
XPathValueFetcher business rule
Managing business rules and expressions