Forum Discussion

EEV-GMF's avatar
EEV-GMF
Qrew Trainee
2 months ago
Solved

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

4 Replies

  • The official code page examples from Quickbase are here, but they still have a disclaimer that they may break.

    https://resources.quickbase.com/nav/app/bq8kmgrcq/action/appoverview/72b77352-3b9d-495e-932f-1cd9f1b15fa3

     

    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.

     

    • EEV-GMF's avatar
      EEV-GMF
      Qrew Trainee

      This seems to have worked! I'm able to click the button repeatedly without a record lock-up (so far).

      Although, oddly enough I don't think the new checkbox I created is checking on-click of the button.

      Also, I created this as a Formula-URL as opposed to a Formula-Rich Text (which is what I had created originally) and QB seems to like that better.

    • EEV-GMF's avatar
      EEV-GMF
      Qrew Trainee

      I hoped it would, but it does not.

      The page does refresh, but it wipes out any of the additional changes made since the last save that took (on both the child and parent record) and drops the user right back onto the stuck record. They can click home and then right back into the same record, but it still will not take any other changes.

      I've not measured exactly how long the record gets stuck for, but it is quite a long period of time (more than 10 minutes), especially considering this is the only interaction the Users will have within the app.