Accessing SharePoint columns via XPath - InfoPath Dev
in

InfoPath Dev

Accessing SharePoint columns via XPath

Last post 05-23-2008 06:49 AM by mjaneczk. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-19-2008 11:45 AM

    • mjaneczk
    • Top 500 Contributor
      Male
    • Joined on 02-18-2008
    • Dearborn, MI
    • Posts 35

    Accessing SharePoint columns via XPath

    I am trying to create an InfoPath form which reads from a SharePoint list.  In particular, the SharePoint list has 2 columns (for now): ToolName, ToolVersion.   The InfoPath form has a dropdown corresponding to the ToolName and a text box corresponding to the ToolVersion.  I set up the data connection just fine.  I can read the ToolName into thedrop down just fine.  I set up the rule to populate the text box for Version.  However, the text box only displays the version corresponding to the first item in the list. The XPath I have to do this rule is: 

    xdXDocument:GetDOM("ToolStore")/dfs:myFields/dfs:dataFields/dfs:ToolStore/@ToolVersion 

    I found in a previous article that I needed to add [../ID = current()/ID] to the end of my Xpath (from above).  I tried that and it didn't work - I actually get nothing showing up in the text box. 

    Thanks in advance.

    Mike

    Mike Janeczko
    Ford Motor Company
  • 05-19-2008 01:29 PM In reply to

    Re: Accessing SharePoint columns via XPath

    I am not to sure.  I know when i have queried a sharepoint list I got every single one back and had them populate repeating table.  You might have to use a caml query to pull which one corresponds to the one listed in the list box.  Or without code you might be able to use filtering within the info path form.

  • 05-23-2008 06:49 AM In reply to

    • mjaneczk
    • Top 500 Contributor
      Male
    • Joined on 02-18-2008
    • Dearborn, MI
    • Posts 35

    Re: Accessing SharePoint columns via XPath

    Thanks for the direction.  I figured it out using filtering.  Essentially, I put a rule in my ToolName drop down which sets the ToolVersion text box.  In the rule, I set a fields value based on an expression.  In the expression I filtered based on teh value in the ToolName drop down. 

    Thanks!

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