Calculating sum of a repeating table column inside another repeating table - InfoPath Dev
in

InfoPath Dev

Calculating sum of a repeating table column inside another repeating table

Last post 05-25-2011 11:46 AM by reddy241987. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 05-18-2011 01:10 PM

    Calculating sum of a repeating table column inside another repeating table

    HI,

    I have a main repeating table with columns category and question/category. Under question/category column I have a nested  repeating table which has columns question and score.

    Here I need to calculate the total score per catgory in a text box , so that I can promote the value  to form library.

    Category                                             Question/category

                                                                   Question                  Score

    Cat 1                                                      Ques1                       

                                                                                                       Total                   

    Cat 2                                                       Ques3

                                                                    Ques 4

                                                                    Ques5

                                                                                                         Total

    The scores are entered by user after the form loads.... and in the place of total I should have the actual total value per category

     I tried calculating using sum(Score), but this works outside repeating table but not inside...

     

    Can you please help me out...

    Thanka in advance..

     

  • 05-20-2011 08:26 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    I am not sure if I understand what the difficulty is with this, but I've attached a sample to this post that does what I think you are saying you need....If I've misunderstood, perhaps you can post your form in a reply so that I can take a look?

    Hilary Stoupa

  • 05-20-2011 08:47 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

     Hi Hilary,

    Thanks for the reply..This is what I need..I am trying to do the same..but nothing is happening...

    I am populating the rows from secondary  data source using code behind..Does that have to do something with this. If I have a textbox outside the repeating table I am able to find the sum..

     

    But anyhow attached is my form.

  • 05-20-2011 02:11 PM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    I'm not sure what you mean by "nothing is happening" -- which field is supposed to be set to what? Are you setting the value in your Total field in code, perhaps, and overwriting the default value?

    Hilary Stoupa

  • 05-23-2011 05:18 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    Hi Hilary,

    I applied sum(Socre)[I displayed this value as the default value for field Total] and when I preview the form and try entering score values , the Total value doesnot calculate and remains blank(this is what I meant when I said nothing is happening]. I did not use code to set the default value.

    Thanks....

  • 05-23-2011 08:16 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    When I preview your form, I can't connect to your data source (of course) -- but when I manually add items, as you can see in the attached screenshot, everything works as anticipated. This would lead me to suspect the issue is going to be somewhere in your code.


    Hilary Stoupa

  • 05-25-2011 06:49 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

     Hi Hilary,

    It worked..It was not working on the preview..when I published the form it worked..But those calculated values are not being submitted to form library. I am just able to blank column ...

     

     

    Thanks in Advance...

  • 05-25-2011 09:09 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    So now I think you are saying that your promoted properties bound to those fields are blank? I'd expect your non-repeating field to behave properly. You may want to double check your promoted properties.

    Hilary Stoupa

  • 05-25-2011 11:46 AM In reply to

    Re: Calculating sum of a repeating table column inside another repeating table

    I did promote them correctly...I tried creating another form..with just inserted fields..it worked correctly...but with this code behind form it is not...I am not understanding how to debug it...

    I checked the promoted fields twice and they are promoted correctly..

    The calculations are performed correctly..but the column in the form is not populated...

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.