Calculating a Total sum of repeating table where repeating table row does not show row total - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculating a Total sum of repeating table where repeating table row does not show row total

Last post 07-12-2016 04:44 AM by K5Optima. 36 replies.
Page 1 of 3 (37 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 06-13-2016 09:46 AM

    Calculating a Total sum of repeating table where repeating table row does not show row total

    Good Day...I have a formula that works on my repeating row where the row does not show a total column.  I created a Total Box that I want he rows to add up to...I do not need to see the calculation of each row,  just the total of all rows are needed.

    The row sums without error:  (RegRateDiff * NumberRegHours) + (OTRateDiff * Number(OTHours) ...however, all the repeating rows do not add into the total Text Box I created...I then created a Footer but that calculated the same, only the first row calculated in.

    How can I get the repeating rows to sum to the Total box without creating a Total Box for each repeating row?

     

    Thank you so much for your assistance! 

     

    Annie1234 

  • 06-14-2016 08:42 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    Put a field in your repeating group label something like RowTotal. Then put your function on that field. Now you will get a total for each row. (Don't put on canvas) Then create a field outside of the repeating group called Total. Place that field in the footer of the repeating table and put this function Sum(RowTotal)
  • 06-14-2016 08:55 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    Thank you for responding!   What do you mean "Don't put on canvas?"

  • 06-14-2016 09:10 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    I mean you don't need to show the field in the repeating table. Because you said you didn't want row totals. You only wanted a grand total.
  • 06-14-2016 09:26 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     How do you not show a field?  Apologies for not knowing too much yet....

  • 06-14-2016 09:34 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    By not showing you not putting it on your form canvas. The part you showing. You can have fields just left in the tree on the right that perform functions or are helper fields. Sorry for it being confusing.
  • 06-14-2016 09:39 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     Oh...I have learned something new....I did not know I could do that...thank you again...I will let you know if I can get it to work for me.

  • 06-14-2016 10:10 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     So my tree is:

    HourlyRetroWages

      HourlyPosition 

      RegRateDiff

      NumberRegHours

      OTRateDiff

      NumberOTHours

      TotalRow  (I placed my function to total the row here)

    TotalHourlyRetro (This is where the Sum(TotalRow) function is)  (I set this outside of the tree and made a footer for the repeating table and placed this field in it but I am receiving an error "TotalRow does not point to a valid location path of a field or group."

     

  • 06-14-2016 10:29 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     I am attaching a pic of what I have done so far in this repeating table....I have set TotalRow as a text box with the function in it and am getting the error I mentioned above.  When I make it a Calculating field, it adds a field to the bottom of the canvas, outside of it, and marks the "HourlyRetroWage" Group with control stores duplicate data notice....not sure how to set this up properly.  When I put in the TotalHourlyRetro field it would not take the Sum(TotalRow), the path is not correct.  Maybe you can see in my picture what I am doing wrong...I highlighted the repeating table and clicked to add a footer and it inserted the table below the repeating table, but within the repeating table...is this correct? 

    Cannot seem to insert the picture. 

     

  • 06-14-2016 10:39 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    I am attaching a form which should demonstrate what you are trying to do.
  • 06-14-2016 11:17 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     I checked my properties and my TotalRow and TotaHourlyRetro are filled out the same as yours with my functions in them but the TotalHourlyRetro keeps giving me the:"TotalRow" does not point to a valid location path of a field or group. error....:

    The form row is set up like this: 

       Position   (Reg. Rate Differential * Number Reg Hours) + (OT Rate Differential * Number OT Hours) 

    so there are five blocks and 4 get calculated to TotalRow that does not show on the canvas.......my properties for TotalRow are Text (string) and a Value: (RegRateDiff * NumberRegHours) + (OTRateDiff * NumberOTHours) 

    I cannot test this although the  "Verify Formula" stated there were no errors.

    The TotalHourlyRetro field is outside of the repeating table in a footer of the table and the property box shows text string and function sum(TotalRow) and I get the formula error when Validating Formula.

    I tried to send a screen shot of my form and tree but it did not insert...just showed an "x" in the picture block. 

     

  • 06-14-2016 11:42 AM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    Could you attach your form so I can have a look please. When you reply click options and upload your form.
  • 06-14-2016 01:12 PM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    File is attached...I did get it to work, I made the TotalHourlyRetro a Calculated Field and went to the properties and added the function and it worked....tested it and it was good!

    If you go to the last section "Timeoff/Leave/Comp Stay,"  I have been trying to figure out how I can get the amount of Days to calculate...say the person is taking one day off:  From: 6/19/16  To:  6/20/16...the 1 should show in the "Amount of Paid Days Off" field.  I researched it and there was a rule with a lot of code but I was confused as I have never used a Rule.

    Can you assist with it?  I haven't done so bad with the form so far with learning on a Linda.com tutorial, huh?  Any suggestions would be greatly appreciated. 

    Thank you for all your assistance! 

  • 06-14-2016 01:30 PM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

    Please have a look at your form. I made the date diff function work for you. I edited the fields to startDate, endDate, and difference for simplicity.
  • 06-14-2016 01:45 PM In reply to

    Re: Calculating a Total sum of repeating table where repeating table row does not show row total

     Thank you so much!  Where is the rule or the function?  It isn't just "difference" is it?  I will catch up with this tomorrow...you have been of great assistance!

Page 1 of 3 (37 items) 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.