InfoPath 2010 browser form Rules - InfoPath Dev
in

InfoPath Dev

InfoPath 2010 browser form Rules

Last post 10-03-2012 02:16 PM by nemo385. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-24-2012 06:08 PM

    InfoPath 2010 browser form Rules

    Hi,

      I have a web browser based 2010 infopath form. Let's say there are a couple of dropdown list box:

      1.) Color

    2.)SeedType

      Based on what value a user selects for Color and SeedType, the Price textbox will display the price for that combination.

     I have a SQL table with a list of price. Here's a small sample

      Color     SeedType     Price

      Yellow     Dwarf         20

    Brown       Garden      30

      Red        Garden      35

    In my form, there are other drop down list boxes with values YES or NO. For e.g., right next to the Price textbox, there are following dropdown list boxes

     •Polenless (YES/NO): If YES, raise the price by 10%

    •Height (> 13"): If YES, raise the price by 8%

    •Organic (YES/NO): If Yes, raise the price by 15%

    •Lifecycle (Annual- YES/NO): If Yes, raise the price by 12%

      For e.g., if Yellow Dwarf is polenless, with height > 13”, Organic YES and having an annual life cycle then the new price has to be computed as 10% + 8%+15%+12% = 45% = 1+ 0.45= 1.45

    Then new price is: 1.45 * Original Price= 1.45*20 = 29

      For each selection made in the drop down list, the new price should be calculated applying appropriate % values.

     Is there a way to do this in InfoPath form using rules? For each color and Seed Type choosen, it will display the price. However that price changes with the values picked from each drop down for the above mentioned criterias.

    For each record, there's a possibility of 16 combinations. How is it handled in InfoPath 2010 form? Please kindly let me know. Thanks.

  • 09-25-2012 05:57 AM In reply to

    Re: InfoPath 2010 browser form Rules

    Hi,

    You can just assign numeric values to each selection. I've done it with option buttons in the sample attached but using dropdowns would work similarly.

    Good luck!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-26-2012 07:54 PM In reply to

    Re: InfoPath 2010 browser form Rules

    Thanks Ernesto for your response. I got the form and could see the o/p as well. Could you please explain how you configured rules for those radio buttons? I will aprreciate your time and effort. TIA.
  • 09-27-2012 03:06 AM In reply to

    Re: InfoPath 2010 browser form Rules

    Hi, glad it helped. You can right click on the form and open it in Design mode. This will allow you to check out the form logic, and them mimic them on your form.
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-27-2012 09:11 AM In reply to

    nemo385:
    Thanks Ernesto for your response. I got the form and could see the o/p as well. Could you please explain how you configured rules for those radio buttons? I will aprreciate your time and effort. TIA.

    That attached template simply does not contain any rules


    The option buttons are configured to return digital Value when selected:  (like 0.08 with 0 for not selected)  which you can check by choosing them and pressing Alt+ENTER and Calculated Value control has its XPath set to:

    • 1 + field1 + field2 + field3 + field4 

    It is not difficult to create rules having that template as hint/starting point


    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 10-03-2012 02:15 PM In reply to

    Re: InfoPath 2010 browser form Rules

    Thanks a lot Ernesto. With your logic, I could implement the same for my drop down options. It was a lot easier than I expected. Thanks again. You guys rock! :)
  • 10-03-2012 02:16 PM In reply to

    Re: InfoPath 2010 browser form Rules

    Thanks Gennady Vanin. I figured out to check design to see how Ernesto implemented his logic for calculation. Thanks for providing pictorial explanation. Appreciate your time and effort. :) 
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.