Using Sharepoint ID - InfoPath Dev
in

InfoPath Dev

Using Sharepoint ID

Last post 01-16-2006 05:18 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-16-2006 11:51 AM

    • bjlove
    • Not Ranked
    • Joined on 01-16-2006
    • Posts 1

    Using Sharepoint ID

    i have a secondary data connection that gets the ID from sharepoint:
    var prDom = XDocument.DataObjects("PRID").DOM;
    XDocument.DataObjects("PRID").Query();
    var prNum = prDom.selectSingleNode("/dfs:myFields/dfs:dataFields/dfs:PR/@ID").text;

    my problem is this:
    i'd like to update my form with the sharepoint id, but this just queries all of them and gives me the latest one.

    is there code that would onLoad get the sharepoint ID? i know that on first load this would be nothing, but i can live with that. using the code above i was able to add one to the number, but this only works if one PR is created at a time. any help would great.
  • 01-16-2006 05:18 PM In reply to

    To look for a specific ID you could use an XPath search, like this:

    var prNum = prDom.selectSingleNode("/dfs:myFields/dfs:dataFields/dfs:PR[@Name = 'NAME_OF_FORM'/@ID").text;

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.