Autopopulate Infopath fields after selecting a specific dropdown option - InfoPath Dev
in

InfoPath Dev

Autopopulate Infopath fields after selecting a specific dropdown option

Last post 07-17-2013 05:32 PM by mcastine. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-11-2013 09:36 AM

    Autopopulate Infopath fields after selecting a specific dropdown option

    Hi everyone,

     I am new here and have already found loads of help just by using the search function.  Although there were some issues that came up that were close to my problem, I haven't been able to find a solution that relates directly to my problem. 

     My issue is the following: I have a large form that needs to be auto populated after I choose one option in one of my fields.  The goal is to choose from a dropdown of a list of "projects" and associate an autofill function for the remaining text boxes left in the form.  Each time, these will be differnt as there are multiple projects to choose from and multiple variables associated with each project. Each project has an extensive list of metadata (all of which have a text box that needs to be autopopulated) on our SharePoint.

     To further break down my problem at a high level, I essentially would like to choose an option in the first text box, and have it autopopulate the rest of my form space with the info related to it in SharePoint.

     I hope I articulated this well enough.  If not, please ask me for more details and I will try to provide a better picture of what I'm looking for.

     Thank you.

  • 07-13-2013 01:45 PM In reply to

    Re: Autopopulate Infopath fields after selecting a specific dropdown option

    Hi MFrey89 and welcome,

    My weekly webinar next Thursday (7/18) will show how to auto-populate large amounts of metadata.

    To give a preview, I intend to discuss the following techniques:

    1. using rule-actions to set-values - certainly this is easiest but if you have >50 fields it will take time
      • to reduce the hassle of editing in the designer, you can open the manifest.xsf in notepad and copy them, just make sure the actions are uniquely named.
    2. using qRules Transform command to copy large data sets without having a gazillion rule actions
      • of course, this requires qRules but is powerful because it uses an XSL to map, so it is data-driven and easy to update when the source or target schemas change
    3. using qRules GetInputParameter and ChangeConnectionUrl to dynamically change the source URL based on an ID passed in to the form (input parameter) so that you can load a different XML based on a previous selection. Useful, when you are trying to pull data out of an XML file but that file name changes.
      • once again qRules to the rescue, but this is super powerful because it means forms can be deployed to SharePoint without hardcoded URLs
      • after loading the XML, you can use either technique 1 or 2 above to copy values over.

    Stay tuned. More next Thursday...

    Patrick Halstead
    Project Manager at Qdabra
  • 07-17-2013 09:32 AM In reply to

    Re: Autopopulate Infopath fields after selecting a specific dropdown option

    Hi Patrick thanks for the reply,

     I think I have a very unique case.  I will try to explain it better:

    1) I have multiple projects on Sharepoint

    2) Each project has an associated list

    3) My goal: On infopath 2007 choose a specific project from a dropdown menu and have the remaining text boxes (each has an attribute to the sharepoint list) auto fill

     

    So for example: I have projects - DOG123, CAT890 and RAT456 listed in sharepoint.  Each project has an associated list (located in sharepoint) but needed to be filled in infopath:

    DOG123 : Food - Purina. Owner - Ted. Legs - 4. Hair - Long. Color - Black

    CAT890 : Food - Chow. Owner - Mike. Legs 3. Hair - short. Color - tan

    RAT456:  Food - Bits. Owner - Stacy. Legs 4. Hair - Short. Color - white.

    My goal is to choose DOG123 and once chosen, have the associated lists auto populate with the right data in infopath.  (so the fields food, own, legs, hair, color would all populate matching the specific project and sharepoint list info).

     Hopefully that clarifies it more.

     Thanks

  • 07-17-2013 05:32 PM In reply to

    Re: Autopopulate Infopath fields after selecting a specific dropdown option

     HI

    If you do a Data Connection to the Lists, then you can populate fields based on what was chosen. For how I use this option is to populate an email address for a Designer from a Roster SharePoint List. . I created this Roster so that it is easy to add/delete people from the field without having to update the form in InfoPath. Which is what I assume you are trying to do. Here is what I did

    Added Data Connection to the "Roster" that holds the Designers Name and Email Address.

    Click on the Dropdown, add an Action. Choose "Set a Fields Value" and in this instance it is DesignerEmail. In the value, chose Field or Group and change the "fields" to be the "Roster" Connection. Click once on the EmailAddress, then on Filter. Chose the list column that would match the dropdown. In this example, it is DesignerName then equal it to the name of the drop down field "Designer".

    EmailAddress[DesignerName= Designer]

     

    So for your list, the coding would say something like:

    Field to Populate: Food
    Value: AnimalFood[AnimalCode = Animal]

    AnimalFood = Column to search in the List  (NEEDS TO BE SAME FOR ALL LISTS)

    AnimalCode= Column Name of the codes "Dog123" (NEEDS TO BE SAME FOR ALL LISTS)

    Animal = the Dropdown Field Name

     

    Let me know if you have any questions.

    Marie
    http://www.castinedesigns.com/sharepoint
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.