Values can be calculated within Data Collector Forms using Calculated Value expressions.
Values are calculated on the device prior to syncing with the cloud database. If the Header is also a calculated header within the OpenGround data model, the value will be re-calculated using the Model Calculation expression when the data is synced to the cloud. You may still want to use Calculated Value expressions in this scenario because it allows the user to see calculated values on the device without syncing the data. If the Header is not calculated in the model, the value calculated on the device will simply sync to the cloud.
Calculated Value expressions can contain a maximum of 3900 characters.
This expression returns the next value for the specified Header. By default, the records are sorted in ascending order by the first depth header:
next('DepthBase')
For next(), an additional parameter can be added to order the records by a different header (in ascending order). For example, this expression returns the next value when the records are ordered by DepthTop:
next('DepthBase','DepthTop')
This expression calculates the sum of all current records for this parent. The Header name is case sensitive and must be enclosed in single quotes. Records are ordered by the Header by default.
Sum('Blows')
This expression adds all the penetration values together to show a total penetration value:
PenetrationSeating1 + PenetrationSeating2 + PenetrationMain1 + PenetrationMain2 + PenetrationMain3 + PenetrationMain4
Please also see the Data Collector Profiles within our standard Configuration Packs for additional examples.
And please see this article for more information on other Data Collector Expressions.