<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using Sharepoint ID</title><link>https://www.infopathdev.com:443/forums/thread/14212.aspx</link><pubDate>Tue, 17 Jan 2006 01:18:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14212</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14212.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14212</wfw:commentRss><description>To look for a specific ID you could use an XPath search, like this:&lt;br /&gt;&lt;br /&gt;var prNum = prDom.selectSingleNode("/dfs:myFields/dfs:dataFields/dfs:PR[@Name = 'NAME_OF_FORM'/@ID").text;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Using Sharepoint ID</title><link>https://www.infopathdev.com:443/forums/thread/12746.aspx</link><pubDate>Mon, 16 Jan 2006 19:51:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12746</guid><dc:creator>bjlove</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12746.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12746</wfw:commentRss><description>i have a secondary data connection that gets the ID from sharepoint:&lt;br /&gt;var prDom = XDocument.DataObjects("PRID").DOM;&lt;br /&gt;XDocument.DataObjects("PRID").Query();&lt;br /&gt;var prNum = prDom.selectSingleNode("/dfs:myFields/dfs:dataFields/dfs:PR/@ID").text;&lt;br /&gt;&lt;br /&gt;my problem is this:&lt;br /&gt;i'd like to update my form with the sharepoint id, but this just queries  all of them and gives me the latest one.&lt;br /&gt;&lt;br /&gt;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.</description></item></channel></rss>