Totals based on drop down selection - InfoPath Dev
in

InfoPath Dev

Totals based on drop down selection

Last post 11-20-2008 06:18 AM by punkn00dlez. 25 replies.
Page 2 of 2 (26 items) < Previous 1 2
Sort Posts: Previous Next
  • 11-18-2008 01:28 PM In reply to

    Re: Totals based on drop down selection

    It still shows the NaN or -1.#IND on the design view and still calcualtes everything to be equal to zero.  The formula checker says there's no issues with my (by my I mean your) formula either.  So technically there shouldn't be anything wrong.

  • 11-19-2008 07:36 AM In reply to

    Re: Totals based on drop down selection

    I'm attaching a quick sample to better explain what I mean. Right click the link, Save As, open in design mode and preview. Put an amount in the Total field, and add some rows to the repeating table with a category of A (use a capital A, that is what I used in my sum formulas). If total is blank and you have amounts in the table, you'll get 'Infinity' in the expression box with the div function. If total is blank and you don't have amounts, you get NaN. If total is zero, you'll have an error too, since we can't divide by zero. I've conditionally hidden another expression box with the same formula, so that you can see how it would only display when there is an amount in total. Hope this helps!

    Hilary Stoupa

  • 11-19-2008 09:31 AM In reply to

    Re: Totals based on drop down selection

    Alright, so I downloaded the file and understand what you're getting at completely, however unlike your total field, my total field is automatically calculated.  Do I need to turn my total field into a regular text box and have the submitter total up the information themselves?

  • 11-19-2008 10:06 AM In reply to

    Re: Totals based on drop down selection

    I wouldn't think so. Just hide the expression box with the div calculation unless the total field has a value in it. The total field on your form is bound to the total field in the data source, correct? and that field has a default value?

    Hilary Stoupa

  • 11-19-2008 10:39 AM In reply to

    Re: Totals based on drop down selection

    Yeah, the total field on the form is bound to the total data source and it's default value was "subTotal-cashAdvance" but I just recently learned I didn't need that, so I got rid of it and set the default value to 0.00.  I've even tried created a new field element named percent, inputting the function we're working with, and then binding the expression box that's showing the errors with the percent element, and that didn't work either.

  • 11-19-2008 01:03 PM In reply to

    Re: Totals based on drop down selection

    So, what is the formula in the expression box that is giving you errors? Can you copy and paste it in here? If you preview the form, and put an amount in the 'total' field, and add line items that have an amount in the 'cost' field (if you have no sum of costs, you'll see an error) do you still have an error? I guess I'm trying to understand what is different between your form and the sample I created....

    Hilary Stoupa

  • 11-19-2008 01:21 PM In reply to

    Re: Totals based on drop down selection

    The form I started out with was the built-in IP template and modified it from there since I never used it before.  Either way, here's the gist of the form, formulas intact.

  • 11-19-2008 01:45 PM In reply to

    Re: Totals based on drop down selection

    I am attaching the template after making some minor modifications:

    1. For your grand total, I put in a default value that sums all the cost nodes
    2. For your category, since you had no default value set, the first item (which is the one you were testing with) was never able to be 'selected'. In effect, category was always blank.

    Take a look and see if this is closer to what you want.

    Hilary Stoupa

  • 11-20-2008 05:08 AM In reply to

    Re: Totals based on drop down selection

    I can't open your form, it's telling me to open it from the location in which it was published.

  • 11-20-2008 05:26 AM In reply to

    Re: Totals based on drop down selection

    Hi,

    You can fix the issues by just opening  the form in design mode and publishing it again .

    Chandrakanth/GGKTech
  • 11-20-2008 06:18 AM In reply to

    Re: Totals based on drop down selection

    Perfect.  Thank you so much for being patient with me.  I like InfoPath a lot now, I hope I can dabble around in it some more.

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