Forum Discussion

OliviaBeres's avatar
OliviaBeres
Qrew Trainee
16 days ago

Totaling Child Records Live on Parent Form

I have created a parent table called "time reports" and a child table called "time spend on projects."

On the "Time Reports" form, the user is able to enter the percent of their time they worked on each project using a grid edit/editable embedded table. The child records in the report have already been created by a pipeline. The user just enters the percent. The user does not create any new rows. 

I'd like the user to be able to see that their percents total 100%. I have created a summary field on the "Time Reports" form, but it doesn't update until the record is saved. 

I tried creating a button to just reload the page (having the auto-save setting turned on), but the data entered in the embedded table isn't saving, so it totally clears their work.

Do you know a way to check the total value of child records while on a parent record live? Or a work around?

I looked for past posts on this topic, but couldn't find any. Maybe I was trying the wrong key words. If you know of another post with the answer, please send it my way! Any help would be greatly appreciated. 

 

  • The problem is that when you refresh the record, if the only changes are to the children in Grid Edit, then the parent record has not been "dirtied", and it will hence not Auto Save, when navigating away to refresh the record.

    So, np, what I do is to make two fields and out them in the form in a hidden section.  The first is called [Dummy] as a numeric field and the second is a formula numeric [Dummy +1] with the formula of. [Dummy + 1]
    then a formula rule that says when [Dummy] is not equal to the value in the field [Dummy +1] change [Dummy] to the value in [Dummy+1].

    That will dirty the record as soon as the parent is put in Edit mode and hence it will Auto Save when you navigate away.

  • The problem is that when you refresh the record, if the only changes are to the children in Grid Edit, then the parent record has not been "dirtied", and it will hence not Auto Save, when navigating away to refresh the record.

    So, np, what I do is to make two fields and out them in the form in a hidden section.  The first is called [Dummy] as a numeric field and the second is a formula numeric [Dummy +1] with the formula of. [Dummy + 1]
    then a formula rule that says when [Dummy] is not equal to the value in the field [Dummy +1] change [Dummy] to the value in [Dummy+1].

    That will dirty the record as soon as the parent is put in Edit mode and hence it will Auto Save when you navigate away.

    • OliviaBeres's avatar
      OliviaBeres
      Qrew Trainee

      Thank you so much, Mark! This is so helpful and clever!

      I will use this to enable/trigger the auto-save.

      Is there any way to get the total to display live without requiring the user to navigate away from the page? No worries if not!

  • Yes, this can be done.  Can you first tell us if you are in edit mode on the Parent Time Reports form, or in Add mode or sometimes in either?  Also are you in Legacy Forms or New Style Forms?

  • Hi Mark! It will be edit mode on the Parent Time Reports form with the editable embedded report. I am using a legacy form. 

  • Ya,I don't think there is a way for the Parent to see the unsaved child records. 

    • OliviaBeres's avatar
      OliviaBeres
      Qrew Trainee

      Makes sense! Thank you so much for your help!