Totaling Child Records Live on Parent Using New Form and New Grid Reports Locking Parent Record
Hello,
Using the new-style forms and new-style grid reports, we are trying to get child records that are updated to subtotal on the parent form.
I have a parent table called "Questionnaires" and a child tabled called "Allocations".
On the Questionnaires form, users are able to enter a percent allocations using an embedded grid report tied to the child Allocations. Allocation records are created via Pipeline and users are only entering a percentage amount.
We would like users to be able to see their total allocation so they know when they have reached 100%. I have added a summary report onto the form, but it does not update until the parent record is saved. This is fine and makes sense, however when the parent record is saved, there is a delay in totals updating.
To get around this delay, I have created a "RunPauseRefresh" (borrowed from the ol' Magic Buttons app) and a "Calculate" button, which is an "Edit Record" button with a redirect to the code page. The redirect to the code page has a 5.5 second pause, which is long enough for QB to process the summary totals, then after the pause the record reloads with totals on the form.
This has been working great while in-development, but as more users have been testing, we are seeing a case of the parent record "locking-up". After clicking the "Calculate" button a few times (users will be doing this as they are changing their allocations frequently during the process), the parent record will no longer save and any changes made to the child records on-form no longer get saved either.
It's like the parent record is "stuck" in an edit process in the background but loads on the screen. Even editing fields native to the parent record will not take and the save button greys-out.
The record locking is complete show-stopper for the application.
Long (extremely long) story short - has anyone experienced this issue and have any advice or a fix/workaround?
Attached is the Code Page and Calculate button
The official code page examples from Quickbase are here, but they still have a disclaimer that they may break.
Here is the one that I think you want. It does use the technique I like to flip a check box from true to false each time is click thus triggering the pipeline.
https://resources.quickbase.com/nav/app/bq8kmgrcq/table/bq8meiyhh/action/dr?key=6
There is a possibility that there are some subtle differences in this code page from the one you were using so my suggestion is to make a new button to try this exact code page exactly the way they've done it and see if it's more reliable.