Pre Populating a field based on data in a drop down list - InfoPath Dev
in

InfoPath Dev

Pre Populating a field based on data in a drop down list

Last post 05-15-2012 08:12 AM by Rob68. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-14-2012 05:49 AM

    • Rob68
    • Not Ranked
    • Joined on 05-14-2012
    • Posts 3

    Pre Populating a field based on data in a drop down list

    Hi,I'm new to Infopath, and am trying to write a simple form for undertaking site audits.  Apologies if the following question has been answered before, but if it has been I could not find it.

     

    I'm using Infopath 2003 and on one part of the form I have inserted a drop down list that allows a user to select the grade of a site (i.e. Grade 1, 2, 3 or 4).  What I'm trying to do is add a field in a later part of the form that populates based on the data in this first drop down list, i.e.:

    Selecting "Grade 1" in the Drop Down will pre fill the other field with "10 hours per week"

    Selecting "Grade 2" will pre fill with "2 hours per week"

    etc.

    I have tried using Rules but to no avail, and any information to assist would be gratfeully appreciated.

     

    Many thanks,

     

    Rob

  • 05-14-2012 10:23 AM In reply to

    Re: Pre Populating a field based on data in a drop down list

    Hi Rob,

    Well, simple rules should suffice. Do you have conditions set correctly? Maybe you can attach your form (or a sample) and we can have a quick peek and post back.

    Thanks,

    P

    Patrick Halstead
    Project Manager at Qdabra
  • 05-14-2012 11:10 PM In reply to

    • Rob68
    • Not Ranked
    • Joined on 05-14-2012
    • Posts 3

    Re: Pre Populating a field based on data in a drop down list

    Hi Patrick, Many thanks for the reply.  Please see attached a sample of the fields I have set up, complete with rules. 

    Many thanks for your thoughts.

     

    Rob

  • 05-15-2012 08:05 AM In reply to

    Re: Pre Populating a field based on data in a drop down list

    Hi - you've made an error that I used to make all the time! :-)

    Rules fire when a field changes. So you put the rules on field1 in your sample, not on field2.

    Another issue - XML / XPath is case sensitive. Your conditions are using proper case, your actual values are all lower case.

    I've attached the changed sample - save the file locally, then right click and select design to open in design mode. From there you can preview.

    Hilary Stoupa

  • 05-15-2012 08:12 AM In reply to

    • Rob68
    • Not Ranked
    • Joined on 05-14-2012
    • Posts 3

    Re: Pre Populating a field based on data in a drop down list

    Hi Hilary,

     

    Thats great - works a treat.  Many thanks for your assistance - I would have never worked that out!!

     

    Regards,

     

    Rob 

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