<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84882.aspx</link><pubDate>Thu, 29 Nov 2012 16:16:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84882</guid><dc:creator>cmschofield</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84882.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84882</wfw:commentRss><description>Hilary,&lt;br /&gt;&lt;br /&gt;
Thank you very much taking the time to troubleshoot this with me. My co-worker recommended another solution through the IP Design mode that works perfectly. Due to our deadline I&amp;#39;ll have to try and figure this out later.&lt;br /&gt;&lt;br /&gt;
Thank you again.&lt;br /&gt;&lt;br /&gt;
- Chris</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84860.aspx</link><pubDate>Wed, 28 Nov 2012 23:15:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84860</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84860.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84860</wfw:commentRss><description>&lt;p&gt;If you are in IP 2007, getting the XPath is easy - right click the node in the task pane and select Copy XPath. &lt;/p&gt;&lt;p&gt;Now, you will only need the XPath from listData to LooseCartons, based on your original post, but copying the XPath and pasting into a text editor will at least show you the correct namespace for your node.&lt;/p&gt;</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84859.aspx</link><pubDate>Wed, 28 Nov 2012 23:09:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84859</guid><dc:creator>cmschofield</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84859.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84859</wfw:commentRss><description>It&amp;#39;s a secondary data source and it&amp;#39;s InfoPath 2007.</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84858.aspx</link><pubDate>Wed, 28 Nov 2012 22:47:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84858</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84858.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84858</wfw:commentRss><description>Is this in your main data source? Or a 2DS? I&amp;#39;m guessing you are using InfoPath 2003 - is that correct?</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84857.aspx</link><pubDate>Wed, 28 Nov 2012 21:52:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84857</guid><dc:creator>cmschofield</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84857.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84857</wfw:commentRss><description>I was wondering the same thing about the prefix so I tried using some that match those on the data source to no avail and I&amp;#39;ve also tried it with only &amp;quot;LooseCartons&amp;quot;. Also, the eventObj.Site.xml did now show a prefix in any of the xml nodes. I&amp;#39;m not sure if that matters, though. Aside from the data sources in the InfoPath Design, is there somewhere else I should be looking to determine the prefixes?&lt;br /&gt;&lt;br /&gt;Is there an online documentation reference I can look at besides the Office Dev Center website?&lt;br /&gt;&lt;br /&gt;Thank you very much for taking the time to respond.</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84854.aspx</link><pubDate>Wed, 28 Nov 2012 20:21:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84854</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84854.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84854</wfw:commentRss><description>&lt;p&gt;My guess would be that t is null because your XPath is incorrect. I&amp;#39;d try just &amp;quot;LooseCartons&amp;quot; like in your original post - but is there a namespace prefix on that XML? You may be missing that....&lt;/p&gt;</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84852.aspx</link><pubDate>Wed, 28 Nov 2012 19:58:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84852</guid><dc:creator>cmschofield</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84852.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84852</wfw:commentRss><description>Yeah, that&amp;#39;s embarrassing. Thanks.&lt;br /&gt;&lt;br /&gt;

I&amp;#39;ve fixed that but now I&amp;#39;m getting another error &amp;quot;Object required&amp;quot; on Alert line below:&lt;br /&gt;&lt;br /&gt;

var t = eventObj.Site.selectSingleNode(&amp;quot;/listdata/LooseCartons&amp;quot;); &lt;br /&gt;
XDocument.UI.Alert(&amp;quot;TEXT:  &amp;quot; + t.text);  // Error happens here.</description></item><item><title>Re: Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84850.aspx</link><pubDate>Wed, 28 Nov 2012 19:21:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84850</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84850.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84850</wfw:commentRss><description>selectSingleNode, I believe, not getSingleNode....</description></item><item><title>Referencing Node in eventObj.Site</title><link>https://www.infopathdev.com:443/forums/thread/84848.aspx</link><pubDate>Wed, 28 Nov 2012 19:18:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84848</guid><dc:creator>cmschofield</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84848.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=84848</wfw:commentRss><description>I&amp;#39;m completely new to InfoPath (since yesterday) and am attempting to retrieve a value from a node. I&amp;#39;m working inside an OnAfterChange event method and working with the eventObj argument. When I output the eventObj.Site.xml to an alert, this is what&amp;#39;s shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;listdata class=&amp;quot;entity&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;_DocumentHash&amp;gt;1d134344a6c52b432b8eb6a5e67cfee4&amp;lt;/_DocumentHash&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Item_no&amp;gt;5860&amp;lt;/Item_no&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Trailer_no&amp;gt;5881&amp;lt;/Trailer_no&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Bol_no&amp;gt;PR-000781&amp;lt;/Bol_no&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Unit_cnt&amp;gt;4.00&amp;lt;/Unit_cnt&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Seal_no&amp;gt;12345&amp;lt;/Seal_no&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;LooseCartons&amp;gt;5&amp;lt;/LooseCartons&amp;gt;&lt;br /&gt;
&amp;lt;/listdata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I need to get the value of the Bol_no and LooseCartons nodes. However the following code returns a JScript error:&lt;br /&gt;
&lt;br /&gt;
var looseCartons = eventObj.Site.getSingleNode(&amp;quot;LooseCartons&amp;quot;).text;&lt;br /&gt;
&lt;br /&gt;
Error: object doesn&amp;#39;t support this property or method.&lt;br /&gt;
&lt;br /&gt;
Am I referencing them correctly? Any help would be much appreciated.&lt;br /&gt;
Thank you in advance!</description></item></channel></rss>