Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms Pro › Issues with Updating / Creating Records in Subforms
- This topic has 3 replies, 2 voices, and was last updated 1 day, 2 hours ago by
Steve-Kai Vyska.
-
AuthorPosts
-
May 16, 2026 at 4:39 AM #54122
Steve-Kai VyskaParticipantHello everyone,
I have two forms:
* **Rentals** (contains a calculated *Total Amount* field and a one-to-many relationship to Rental Costs)
* **Rental Costs** (fields: *Amount*, *Note*)In the **Rentals** form, the *Total Amount* field is a calculation based on the related *Amount* entries in **Rental Costs**.
If records already exist in **Rental Costs**, editing them works correctly:
After changing an amount and pressing Enter, the *Total Amount* updates immediately.However, newly created records behave differently:
* If I add a new row directly through the **Rental Costs** subform inside the **Rentals** form, the new entry is ignored until I manually refresh the **Rentals** form.
* Even leaving the form and reopening it does not refresh the calculated value automatically.
* The total only updates after clicking the refresh icon manually.The same issue occurs when:
* creating a new related record via the “new record” button,
* entering values in the separate subform window,
* and then returning to the parent form.The calculated field still shows the old value until a manual refresh is triggered or an existing subform record is edited.
Another observation:
Changing fields directly inside the **Rentals** form itself also does not trigger a recalculation of the calculated field.Currently, the calculation only refreshes when:
* editing an existing subform entry,
* deleting a related record,
* unlinking/detaching a record,
* or manually refreshing the form.Deleting or detaching related records works exactly as expected — the calculated field updates immediately in those cases.
Has anyone encountered this behavior in Tap Forms Pro or knows whether this is expected behavior, a refresh issue, or possibly a bug?
Have a great weekend everyone.
Steve
May 16, 2026 at 5:08 PM #54129
Steve-Kai VyskaParticipantSmall addition / clarification:
The child/subform records themselves seem to be saved correctly. Their own fields and calculations update as expected.
The issue appears to be on the parent side: newly created or newly linked subform records do not seem to invalidate or trigger recalculation of the parent record. Existing related records behave differently: editing, deleting, or unlinking them does trigger the parent calculation immediately.
So the problem is not that the new Rental Costs record is missing, but that the Rentals record does not recalculate its calculated Total Amount until I manually refresh it.
May 16, 2026 at 8:15 PM #54130
Daniel LeuParticipantYeah, I got used to this behavior. If you create or update the child record from a script, run
childRecord.refreshCalculations()once you have populated it with your values.Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksMay 17, 2026 at 2:08 AM #54132
Steve-Kai VyskaParticipantThanks for the suggestion.
I tested this with a script that writes values into the related subform records.
The script fills/updates the subform records without calling
refreshCalculations()on those child records. After callingsaveAllChangesAndRefresh(), the new values are visible in the subform, and the calculation fields inside the subform records are updated correctly.So this part works as expected.
The remaining issue is the parent record.
The parent record has a calculation field that depends on the calculation results from the related subform records. These subform calculation values are already correct and visible, but the parent calculation field still does not update.
I also tried the recommended call on the parent record:
function Test() { record.refreshCalculations(); } Test();Unfortunately, this does not change the parent calculation either.
So the subform records and their own calculations are refreshed correctly. The problem is that the parent record does not seem to recalculate based on the updated subform calculation values, even after calling refreshCalculations() on the parent record.
Have a nice Sunday
Steve
-
AuthorPosts
You must be logged in to reply to this topic.