<?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: Object Required xdocument.dom.selectsingle node error</title><link>https://www.infopathdev.com:443/forums/thread/29209.aspx</link><pubDate>Fri, 06 Jun 2008 00:40:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29209</guid><dc:creator>rbowles</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29209.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29209</wfw:commentRss><description>&lt;p&gt;I figured it out.&amp;nbsp; My path was wrong.&amp;nbsp; Once I corrected my path it worked.&amp;nbsp; However the data calcuation only works on the first record.&amp;nbsp; Any ideas on how to get it to work on them all.&amp;nbsp; I put the code so it executes on each record but it still only gets the first record.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any Ideas?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Object Required xdocument.dom.selectsingle node error</title><link>https://www.infopathdev.com:443/forums/thread/29206.aspx</link><pubDate>Thu, 05 Jun 2008 19:48:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29206</guid><dc:creator>rbowles</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29206.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29206</wfw:commentRss><description>&lt;p&gt;I copied the logic in a date calcualtion routine i found on the net.&amp;nbsp; I substittuded my datasource variables for the one in the sample and I keep getting the above error.&amp;nbsp; I am doing it in vbscript.&lt;/p&gt;
&lt;p&gt;Here is my code&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;Sub CalculateDateDifference()&lt;br /&gt;Dim strStartDate&lt;br /&gt;Dim strEndDate&lt;br /&gt;Dim strDateInterval&lt;br /&gt;Dim dtStart&lt;br /&gt;Dim dtEnd&lt;br /&gt;Dim intDateDiff&lt;br /&gt;&amp;#39;Retrieve the ISO date from the InfoPath date fields&lt;br /&gt;strStartDate = XDocument.DOM.selectSingleNode _&lt;br /&gt;(&amp;quot;/dfs:queryFields/q:CashApp/@DISC_DATE&amp;quot;).text&lt;br /&gt;strEndDate = XDocument.DOM.selectSingleNode _&lt;br /&gt;(&amp;quot;/dfs:queryFields/q:TOTALS/@PAY_DATE&amp;quot;).text&lt;/p&gt;
&lt;p&gt;The code I copied it from is exactly the same except for the parts in the quotes.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Randy&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>