Automatic field update when selecting from a drop down list - InfoPath Dev
in

InfoPath Dev

Automatic field update when selecting from a drop down list

Last post 06-08-2009 01:40 PM by Libel. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-08-2009 12:04 PM

    • Libel
    • Not Ranked
    • Joined on 06-08-2009
    • Posts 4

    Automatic field update when selecting from a drop down list

    Hi guys, I have just started "playing" with Sharepoint and Infopath so excuse my newbiness :) (and I am not a dev at all).

    My problem: a field value doesn't update automatically when I select my values from a drop down list.

    Here is my thing: I have built a form that helps me calculate the cost of ressources per hour worked. I want to be able to calculate the amount of a fixed contingency - let's say 10% - on the overall amount of $. Therefore I have built a drop down list. I added the following values: 5%, 10%, 15% so that the user can select easily the right percentage to apply.

    In another column, I have a field that I want to be automatically populated based on the following formula: grandtotal * contingency percentage.

    In my drop down list, I setup rules for each percentage (define a field value).

    Action: define field  value

    Field: Contingency

    Value: totalbudget (name of my field) * 0,05

    My issue is that as soon as I select other values in my drop down like 10% or 15% (after having selected 5% to test), my field value doesn't update accordingly. Do I need to add something in my Xpath expression? Sorry I am totaly lost here :)

    Thank you!

    Filed under:
  • 06-08-2009 12:48 PM In reply to

    Re: Automatic field update when selecting from a drop down list

    I just did a quick test on this. I think the issue is that you do not need a rule for each value in your drop down list. If you are simply multiplying the amount in the dropdown (value = .05, display = 5%), then you just need to set up a rule to 'set a field's value' and use the formula original (amount * dropdown value) my formula looked like this (. * amount) where the . is the dropdown value. also, you would want to do this same rule on the box where you input the original amount. this will recalculate the contingency amount if the amount changes without having the reselect the amount in the dropdown box. let me know if this helps.
    Filed under:
  • 06-08-2009 01:40 PM In reply to

    • Libel
    • Not Ranked
    • Joined on 06-08-2009
    • Posts 4

    Re: Automatic field update when selecting from a drop down list

    Michael,

     Many many thanks for your help, it works perfectly! I didn't even think about using the value field when adding a list value. I guess I have a lot to learn ;-D

     Thanks again.

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