NOTE: The Listfield expressions will be recalculated on every save of the record containing the expression.
listfieldsummary(FieldIdentifier, SubFieldIdentifier, AggregateType, Filter)
listfieldconcatenation(FieldIdentifier, SubFieldIdentifier, ConcatSymbol, Filter)
FieldIdentifier: is the ID of the Listfield
SubFieldIdentifier: is the ID of the column required for aggregation
AggregateType: is one of the following available options sum/ avg/ min/ max/ count
- sum (adds up the total of all values) - SubField must be Numeric
- avg (averages the values in the column) - SubField must be Numeric
- min (takes the minimum value in the list field column)
- max (takes the maximum value in the list field column)
- count (takes the count of list field rows that match the filter)
ConcatSymbol: Where SubField is a text field, you can return text values in a concatenated string - this parameter specifies what the join is between fields
The filter is the standard format of filters we use for expressions such as
Single Filter - '$filter={{Status}} eq \'Red\''
Multiple Filter - '$filter={{Status}} eq \'Red\' and {{Category}} eq \'Ops\''
where the Listfield columnID is [Status]
Example:
- listfieldsummary('Listfield01', 'Effort', 'count') - Counting the number of rows for the whole list field
- listfieldsummary('Listfield01', 'Effort', 'avg', '$filter={{Status}} eq \'Red\' and {{Category}} eq \'Ops\'') - Averaging the Value for rows that contain status is red and category is ops
- listfieldconcatenation('Checklist1', 'UID', '|', '$filter={{Status}} eq \'Red\'') - Concatenating the Rows UID column where status is red
Note: Backslahes to Escape Characters
Backslashes to escape characters when code read as:
listfieldsummary('Checklist1', 'UID', 'count', '$filter={{Verdict}} eq \'Pass\'')
So $filter= eq 'Pass' is the filter that needs to be applied but because it needs to all be in single quotes, any single quotes contained within the filter are escaped from closing the filter by adding a \' This then gets read as ' when the expression runs.
Make sure to click the 'Save' button when making any changes in order for them to be added to the next app version. Once you have made all the changes you need to an application you are then ready to publish it to workspace.
Note on Field Dependencies - Read more here
Field dependencies are by definition the other field(s) that are reliant on a given field, usually dependent fields are interlinked to one another by expressions and are indicated by an atom symbol. They are a crucial tool when looking to delete Fields within an App or, when it comes to understanding the structure and data flows of an App.
Comments
0 comments
Article is closed for comments.