KB Article #183174
What are computed properties in InterPlay and how to use them?
Problem
What are computed properties in InterPlay and how to use them?
Resolution
A computed property is a type of metadata information that is needed when displaying forms in InterPlay. Sometimes the physical information present in the files is not enough and some computations are needed based on the physical data.
Computations can be done via aggregation functions and are performed on children. On Files, computed properties can be used to compute values using the Format properties (parent line properties) and on Format computed properties can be used to compute values using the child lines properties (elements as they were called in the old Designer).
The computed properties are automatically computed in InterPlay based on the source properties.
Check point 3. in the Documentation: For computed properties, complete the additional fields: Creating the properties
So, for computed properties, additional fields need to be filled in. For the Operation field, here are the Operation Names applied to child objects:
Business Objects for Collection :
- sum: sum of child object values for target property
- avg: average of child object values for target property
- count: number of child objects
- max: maximum value of child objects for target property
- min: minimum value of child objects for target property
- list: list of child object values for the target property. The number of values stored depends on the maximum number of characters defined for the calculated field.
- any: value of any child for the target property.
If for example you need to do a count, the field will display as a value in InterPlay the number of all objects present in the opened collection.
If you have a property calculated with Operation "sum", the value displayed in InterPlay when the collection is opened would be the sum of all the values in the target property on the objects specified by the target Type, present in this collection.
For example, you can have two properties "DEBIT_SUM" and "CREDIT_SUM" on a collection type "DOCS", and an object type "DOC" linked to this collection with properties "MONTANT" and "DIRECTION".
For DEBIT_SUM:
- the target Type would be: DOC
- the target Property would be: AMOUNT
- Filter: DIRECTION="D
For CREDIT_SUM:
- the target Type would be: DOC
- the target Property would be: AMOUNT
- Filter: DIRECTION="C
This will display in the collection:
- the value for DEBIT_SUM: the sum of all amounts of all DOC objects in the open collection, where DIRECTION="D".
- the value for CREDIT_SUM: the sum of all amounts of all DOC objects in the open collection, where DIRECTION="C".