Adding values of Multiboxes - InfoPath Dev
in

InfoPath Dev

Adding values of Multiboxes

Last post 02-15-2011 10:39 AM by SaXx143. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-02-2011 01:41 PM

    Adding values of Multiboxes

    Hello,

    I am new to info path so i am going to try and explain this as close as I can.

    I have a work sheet that I am making. On the sheet I have several Multi boxes, check boxes, etc. I need for each one of those choices to equal a dollar amout. For instance if the user pics out of the multibox Red lollipops, and from the check box section, Kid size. I need when the total button is clicked or if the total field auto populates it to say $60 dollars. Red lollipops are $5 (blue ones are $2) and Kids size are 12 (grownups are 15) So total equals 5*12= 60

     How is this done? 

    Anyone have a clue? Its like a shopping cart. 

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

    Hi SaXx143,

    You should start by making all your fields integer data types (you can change this in the field properties box.) What controls, exactly, are you using? For most of them there is a way to display text that corresponds to an actual number value. After that it's just multiplication. The attached form has several different options which the user selects.
  • 02-07-2011 02:04 PM In reply to

    Hello, Thanks for your response. I have checked out the attachment. I am going to see what I can do, however a lot of it I didnt understand. I changed all my numbers to either interger or Dicimal (double). SO now in my total line I am tring to put in a long formula that will calculate my sheet... Somewhere I am missing something on how to make that happen... Here is what I have. So far. Any advise would be much apprecited. ( the column in the right is just to put in your own hours and a long formula in the my total should say roughly what the project should cost.

     

    Edit: I figured I would put in the formula that i need to attempt to right for the Totals line.

    This is a guess-timate as to how it should go...

    If Event Type is not = Special

    Total = Event type + Additional Options + Photography hours + Photo Edit per pic (which should be       number entered time 5) + CD Extras (which should be # entered * .45) - Discounts

    If Event Length >0

    (Event Length * 75) + (Event Length +2(35)) + (Event Length * 10) + 30 + Video Hours * Cameras + (Editing Hours * 35) + (Digitizing hours * 10) + (Designing hours * 30) + Additional Options + Photography hours + Photo Edit per pic (which should be number entered time 5) + CD Extras (which should be # entered * .45) - Discounts

    else

    Video Hours * Cameras + (Editing Hours * 35) + (Digitizing hours * 10) + (Designing hours * 30) + Additional Options + Photography hours + Photo Edit per pic (which should be number entered time 5) + CD Extras (which should be # entered * .45) - Discounts

  • 02-07-2011 04:05 PM In reply to

    Re: Adding values of Multiboxes

    Hi Sax,

    Can you upload your XSN file instead of an XML file? InfoPath can't open XML files if they don't match an XSN file on your computer (at least, I don't know of a way.)

    Thanks!

    Until I see your form, I won't know, but, yes, just set your Total field using your formulas (which are huge, by the way!).

  • 02-08-2011 08:51 AM In reply to

    Re: Adding values of Multiboxes

    Yes I wanted to but the maximum file size here is 128kb and mine is 293kb. Here is a link to the file.... https://my.syncplicity.com/share/e8hfcidikt/Work_Estimate2.xsn Thanks for taking the time to help, SaXx
  • 02-08-2011 07:02 PM In reply to

    Re: Adding values of Multiboxes

    Hi Sax, sorry, I don't know if it will work for you to show me this form. Your link seems to be broken (try going to it), or maybe this screen is displayed to non-logged in users - it is a https:// address after all.

    If you are having any more problems, please let me know.

    EDIT: After going to syncplicity.com, I see that a file storage trial is free. Could you create a new account, post your form there, and send me the username and password to the account via Infoath Dev? I think this will work.
  • 02-09-2011 09:35 AM In reply to

    Re: Adding values of Multiboxes

    If you want I can try it that way but I think I know what happened.. I forgot that I sent you the link and I renamed my folder to better suit my naming convention (I'm Anal) and I think it corrupted the link. Try this new one it worked for me not logged in. https://my.syncplicity.com/share/sgx8fu1moe/Work_Estimate2.xsn
  • 02-09-2011 12:14 PM In reply to

    Re: Adding values of Multiboxes

    Hi SaXx, thanks for the new link, it worked fine. As to your form, I see why the multiple-selection listbox is giving you trouble. The listbox treats different entries with the same value as the same, so clicking "Photo on Video," which has a value of 300, also turns on all the other listbox entries with a value of 300. There are several things you could do, but here's your best option:

    1. Change the listbox back to text (I know I told you to make it integer, I apologize).
    2. Then change its values to strings like "photovideo" or "weddingcredits."
    3. Then use a button to set your total field, and add rules like this:

    IF any occurence of LISTBOX = "Photo On Video" THEN total = total + 300.

    And so on for all the values of the listbox.

    To use "any occurence of" in rules, change the selection in the drop-down listbox in the Field Selector to "Any Occurence of TOTAL" (the name of your field that stores the TOTAL value.)

    You'll be able to keep all your other fields as Integer data types. If you need me to, I'll see if I can get your form to you with the changes to the list box.

    Have a great day!
  • 02-14-2011 10:42 AM In reply to

    Re: Adding values of Multiboxes

    Thank you for helping me... I will try your suggestion today and see what happens. Will keep you posted. I apologize for taking so long to respond but work last week got crazy out of no where. Took me off guard. It has slowed a bit. Thanks again.
  • 02-15-2011 10:39 AM In reply to

    Re: Adding values of Multiboxes

    You are the man. I finally started understanding how to use the program after your advice. Thank you so much for taking the time to help me. I was able to accomplish what I wanted done however I did it without the "any instance of" stuff you were talking about. I could not find that but I was still able to make the rules and the calculate button worked just fine. Thanks again.
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.