Amending value depending on value selected in dropdown box - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Amending value depending on value selected in dropdown box

Last post 06-15-2015 10:31 AM by Mark B. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-14-2015 07:45 AM

    • Mark B
    • Not Ranked
      Male
    • Joined on 01-08-2012
    • Blyth, Northumberland. UK
    • Posts 9

    Amending value depending on value selected in dropdown box

    Hi

    Having returned to InfoPath after a long break, I was wondering if what I want to do is possible.

    I have a dropdown box of products which is feed from an .xml file, what I would like to happen is once the user has selected the product the correct price appears in a separate box. (Price is also included on the .xml file). At the moment the user selects the product from the dropdown and then has to manually enter the price.

    Currently using InfoPath 2010 

    Thanks in advance for any help provided.

    Regards

    Mark 

  • 06-14-2015 10:29 PM In reply to

    Re: Amending value depending on value selected in dropdown box

     Hi Mark,

    As long as the XML file has the values as follows:

    <price-list>

    <product>

    <name>Apple</name>

    <price> 1.29</price>

    </product>

    <product>

    <name>Banana</name>

    <price> 2.37</price>

    </product>

    </price-list>

    You can use an action rule with a set value action to set the price based on the value selected. Simply use a filter to set the value equal to the secondary data source price field with a filter which has the secondary data source value name on the left and the main data source field used for the dropdown on the right.

    Good luck! 

    Patrick Halstead
    Project Manager at Qdabra
  • 06-15-2015 10:31 AM In reply to

    • Mark B
    • Not Ranked
      Male
    • Joined on 01-08-2012
    • Blyth, Northumberland. UK
    • Posts 9

    Re: Amending value depending on value selected in dropdown box

    Thanks, I'll give that a go 

    OK I now feel really stupid, could not get that to work! Do I apply the rule to the name field or the price field? 

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