Populating Fields from DD List - InfoPath Dev
in

InfoPath Dev

Populating Fields from DD List

Last post 06-14-2006 02:10 PM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-14-2006 11:25 AM

    Populating Fields from DD List

    I'm trying to populate a field with data that is in columns available from a secondary source coming from SharePoint. DataSource has 3 columns: ID, Cost_Code & Title. Dropdown shows Cost Code and text box should display Title. Using a rule to set the fields value with the following xpath expression:
    xdXDocument:GetDOM("Cost Code")/dfs:myFields/dfs:dataFields/dfs:Cost_Code/@Cost_Code[ID = current()]
    Could someone please tell me what I am doing wrong?
    Dean
    Charlotte, NC
  • 06-14-2006 12:24 PM In reply to

    Re: Populating Fields from DD List

    Could you provide a tree of your data source? I think it looks like this:

    Cost_Code
    --Cost_Code
    --ID
    --Title

    And if so, you're XPath should be this:

    xdXDocument:GetDOM("Cost Code")/dfs:myFields/dfs:dataFields/dfs:Cost_Code/@Cost_Code[../@ID = current()]
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-14-2006 01:02 PM In reply to

    Re: Populating Fields from DD List

    Matt, your guess is correct. I've copied you xpath statement without any success. How can I provide a tree of my data source?
    Dean
    Dean
    Charlotte, NC
  • 06-14-2006 02:10 PM In reply to

    Re: Populating Fields from DD List

    What guess was correct? To provide a tree, you can just do it in text kind of like I did it above.

    Also - your drop-down list uses the ID field as the "value" right? Make sure that your display name is "Title".
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.