Using Calculated Fields with Repeating Sections or Tables Repeaters - Unity Forms - Foundation 24.1 - Foundation 24.1 - Ready - OnBase - Premier - external - Standard - Premier - Standard

Unity Forms

Platform
OnBase
Product
Unity Forms
Release
Foundation 24.1
License
Premier
Standard

Unity Forms designers can configure a field with an expression that involves the aggregation of repeating data. Sums and averages can be calculated from repeating data.

For sums, the syntax is sum([repeatername],[fieldname]) where repeatername is the control ID of the repeater (table or repeating section), and fieldname is the control ID of the field within that repeater.

For example, if you have a repeater called LineItem and a field within that repeater called Price, my sum function for that field would be sum([LineItem],[Price]). This would calculate the sum of the values of Price for each item in the repeater.

For averages, the syntax is avg([repeatername],[fieldname]) where repeatername is the control ID of the repeater (table or repeating section), and fieldname is the control ID of the field within that repeater.

For example, if I have a repeater called LineItem and a field within that repeater called Price, my average function for that field would be avg([LineItem],[Price]). This would calculate the average of the values of Price for each item in the repeater.

Fields involved in aggregate functions must be numeric. Aggregate functions, just like numeric operations, are executed against keyword and non-keyword fields of the following data types: Numeric 9, Numeric 20, Floating Point, and Currency. Aggregate values are calculated in real time as necessary.

Note:

A calculated field inside of a repeater/table cannot have an aggregate expression that references that specific repeater/table or references another repeater that uses an aggregate function on the repeater.