using the sum function in a repeating form - InfoPath Dev
in

InfoPath Dev

using the sum function in a repeating form

Last post 11-04-2010 03:40 PM by r-squared. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-04-2010 10:34 AM

    using the sum function in a repeating form

    Hello -- I am a newbie. I am NOT a programmer and really don't want to be a programmer -- but I need to get a relatively simple form produced.

    This form will help the end user produce a course outline and at the same time give the manager of the team (myself) an estimate of the hours required to develop the course.

     The form consists of a repeating form with five or six questions about the specific module in a course. At the end of the form there is a section for the instructional designer to fill in the amount of time in hours that he or she believes it will take for them to complete development of a specific module.

    If they need more than one module they repeat this form and go through the process again.

    At the end of the form there is a place for the sum of the hours to come up.

    First mistake had something to do with the control form doing duplicate date -- and so when you pressed the repeat button and filled in the hours whatever went into the last post would get put in all hour boxes.

    Somehow I fixed that. So now that control is a simple text with double decimal as the data type.

    However, now the total  hours control only shows a zero (0), The set-up is as follows:

    The control in the repeating form (where users are outlining each module) is named modhours and is set for a datatype as double decimal.

    The control at the end of the repeating form is named tothours. It is set as a double decimal as well.The value for this control is sum(modhours),

    Any ideas on how to resolve this would be greatly appreciated.

    rr

  • 11-04-2010 10:52 AM In reply to

    Re: using the sum function in a repeating form

     Do you have the "Recalculate this formula when the value changes" box unchecked in tothours' properties?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-04-2010 11:22 AM In reply to

    Re: using the sum function in a repeating form

    No, the update this value check box is checked; I have, however, tried it both ways and still get a zero in the sum box.

     

  • 11-04-2010 12:13 PM In reply to

    Re: using the sum function in a repeating form

    Might you be willing to attach your form to this forum thread?  This should work pretty easily, so it's hard to guess what's wrong without a very detailed description of your form's setup.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-04-2010 01:04 PM In reply to

    Sure. However, I must be brain dead this pm as I don't see an icon to attach a file in the forum writing tool. <sigh>

  • 11-04-2010 01:19 PM In reply to

    Ok, i found the attach file in options tab. Here it is.

  • 11-04-2010 01:47 PM In reply to

    Re: using the sum function in a repeating form

    The problem is that you have two different modhours fields in your data source (modhours and ModHours), and your sum() function is referring to the one that's not actually being used in the form.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-04-2010 03:40 PM In reply to

    Re: using the sum function in a repeating form

    Jimmie -- thanks so much.

    I hate it when I am a "complete" idiot. Nice catch!

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