Automatically Populate Fields from a Drop-Down - InfoPath Dev
in

InfoPath Dev

Automatically Populate Fields from a Drop-Down

Last post 09-22-2011 06:05 AM by ktausher. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 12-13-2006 03:27 PM

    • Pasu
    • Not Ranked
    • Joined on 12-13-2006
    • USA
    • Posts 24

    Automatically Populate Fields from a Drop-Down

    I have a question in response to an article at,
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85

    The above tutorial details about automatically populating fields using XML file as a secondary data source.

    I would like to follow the same methodology, but with SharePoint List as a secondary data source.

    If there is a way to achieve it, please post it.

    Thanks.
  • 12-13-2006 10:54 PM In reply to

    Re: Automatically Populate Fields from a Drop-Down

    Hello Pasu and welcome to the forums,

    Yes, we can auto populate the fields using SharePoint List as the secondary data source
    Steps to follow:
    1. Create the SharePoint CustomList
    2. Select the field to which the data is to be autopopulated
    3. select look up values from an external data source below the list box entries in the properties
    4. Click on add button beside the data source field
    Select Create a new connetion to - Recieve
    5. Select Share point library or list radio button and click on nextdata and click on next
    6. Give the SharePoint List URl and click on next
    7. Select the list from the drop down from which values to be populated and click on next
    8. Select the value which is to be populated and click on next
    9. Select Automatically retrieve data when form is opened check box and click finish
    10. Follow the procedure for all the fields that are to be populated

    Hope this helps you!
    Shilpa
    INFOPATHDEV India
  • 12-14-2006 08:05 AM In reply to

    • Pasu
    • Not Ranked
    • Joined on 12-13-2006
    • USA
    • Posts 24

    Re: Automatically Populate Fields from a Drop-Down

    Thanks for your response Shilpa. But that did not provide me with a solution.

    My scenario is similar to that of one described by Matt Faus in his article at, http://www.infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85.
    The only difference is that I would like to use a SharePoint List as secondary data source instead of an XML file.

    I beleive that I need help in editing XPath (Step 10 of 'Fill the drop-down list with values from the secondary data source and add rules' section in the aforementioned article.) inside the Rules section of drop-down list.

    Thanks in advance!!
  • 12-14-2006 08:54 AM In reply to

    • Pasu
    • Not Ranked
    • Joined on 12-13-2006
    • USA
    • Posts 24

    Re: Automatically Populate Fields from a Drop-Down

    I figured it out using Trial and Error method. Prefixing @ to ID solved the issue.

    The actual XPath is,
    quote:
    xdXDocument:GetDOM("Clients")/dfs:myFields/dfs:dataFields/dfs:Clients/@City[../@ID = current()]
    Thanks to all those who were trying to offer their help.
    And special thanks to Matt Faus.
  • 09-21-2011 09:07 PM In reply to

    Re: Automatically Populate Fields from a Drop-Down

    Hello Pasu,

    I know this was posted a long time ago - but I'm trying to do the same thing in 2010 and the @'s don't seem to work.   I wondered if you've made this work in 2010? 

    Thanks! 

    Karen

  • 09-22-2011 06:05 AM In reply to

    Re: Automatically Populate Fields from a Drop-Down

    I figured it out.  In SharePoint 2010 the fields are set up in two groups - query and data - so the field names are prefaced with d: or q:   In my case the XPath looked like this.. 
    xdXDocument:GetDOM("ClientInfo")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:ID = current()]

  • 09-22-2011 06:06 AM In reply to

    Re: Automatically Populate Fields from a Drop-Down

    I figured it out.  In SharePoint 2010 the fields are set up in two groups - query and data - so the field names are prefaced with d: or q:   In my case the XPath looked like this.. 
    xdXDocument:GetDOM("ClientInfo")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:ID = current()]    No @'s needed anymore

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