Setting rules in a dropdown for calculations - InfoPath Dev
in

InfoPath Dev

Setting rules in a dropdown for calculations

Last post 03-10-2011 02:12 AM by Dogtown. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-10-2011 02:12 AM

    • Dogtown
    • Not Ranked
    • Joined on 03-09-2011
    • Luxembourg
    • Posts 1

    Setting rules in a dropdown for calculations

    Hi,

    I've got 2 dropdowns,
    in the first one"Budget Item" I've got 3 choices ("Coffe & Refreshments", "Vin d'Honeur" and "Meal")
    in the second one "Currency" 2 choices ("EUR", "UHF") .

    I'm looking to have a user select one of the 3 choices of the "Budget" Item" and 1 of the "Currencies" that would then do a simple calculation and output the result into the text box "Calculation".

    In the first dropdown, I've set a rule with a condition in a field's value for each choices; 

    1. a). "Calculation" = ("Guests" + "Personnel") * 2 ---> if "Budget Item" contains "Coffe & Refreshments" and "Currency" contains "EUR"
            or   
      b). "Calculation" = ("Guests" + "Personnel") * 500  ---> if "Budget Item" contains "Coffe & Refreshments" and "Currency" contains "HUF"

          
    2. a). "Calculation" = ("Guests" + "Personnel") * 5   ---> if "Budget Item" contains "Vin d'Honneur" and "Currency" contains "EUR"
           or
      b). "Calculation" = ("Guests" + "Personnel") * 1000 ---> if "Budget Item" contains "Vin d'Honneur" and "Currency" contains "HUF"

    3. a). "Calculation" = ("Guests" + "Personnel") * 30   ---> if "Budget Item" contains "Meal" and "Currency" contains "EUR"
           or
      b). "Calculation" = ("Guests" + "Personnel") * 5000 ---> if "Budget Item" contains "Meal" and "Currency" contains "HUF"

    "Guests" and " Personnel" are text boxes where the user inputs the number of participants.
     
     
    There is trouble shooting to display the corect result in the "Calculation" box:
    For 1. a). it works, example if "Guest" and "Personel" values are 2 respectivly then the result in "Calculation" is 8.
    For all others the result is always the same as for 1. a).
     
     
    Does anyone have a clue or is there maybe an easyer way of doing the calculation?
     
    Thank you for your support.
    Robert


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