Calculated fields in parent record cannot reliably read single-choice fields inside Repeatable sections on mobile (array/object wrapping issue)
T
Tyler Dunlap
I am experiencing inconsistent behavior with calculated fields that need to read values from single-choice fields located inside a repeatable section.
When a calculated field (located outside the repeatable) tries to access a single-choice field inside the repeatable section via record.form_values["key"], the value is frequently returned as:
- An Object, or
- An Array(1) containing the actual value
This requires complex extraction logic such as:
if (Array.isArray(rateRaw)) rateValue = rateRaw[0];
else if (typeof rateRaw === "object") rateValue = rateRaw.value || ...
While this approach works on the web, it is unreliable or completely fails on the mobile app, often resulting in the calculated field returning 0 even when data is present.
Request to provide a consistent and simple way to access the actual stored value (string or number) of a single-choice field from within a repeatable section in parent-level calculated fields. Ideally without needing manual array/object unwrapping.
Potential solution to either:
- Make record.form_values["key"] consistently return the raw stored value (string/number), or
- Provide a helper function like CHOICEVALUE_IN_REPEATABLE() or improve REPEATABLESUM() to support conditional logic based on choice fields more reliably.
Additional Context:
This issue is particularly painful for common use cases like conditional summing (e.g. sum hours only when rate_type = "Straight Time"). The same code works reliably on web preview but fails on mobile, creating a disrupted user experience. Using stored values (Label;value format) helps but does not fully resolve the mobile inconsistency.
Steps to Reproduce:
Create a repeatable section with a single-choice field. -> Create a calculated field outside the repeatable that loops through records and checks the choice value. -> Test on web (works) vs mobile app (returns 0).
This has been a recurring pain point when building complex time/expense/labor forms.