<?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: Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65575.aspx</link><pubDate>Tue, 29 Mar 2011 21:15:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65575</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65575.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65575</wfw:commentRss><description>&lt;p&gt;The oldest version of IP I have installed is IP 2007, SP 2, I&amp;#39;m afraid. In IP 2007, SP 2, I can use the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set dataObj = XDocument.DataObjects(&amp;quot;GetDatePlusDays&amp;quot;).QueryAdapter&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;With the name of my own data connection instead of &amp;quot;GetDatePlusDays&amp;quot;, of course. Hopefully someone with IP 2003 SP 1 will be able to chime in.&lt;/p&gt;</description></item><item><title>Re: Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65571.aspx</link><pubDate>Tue, 29 Mar 2011 19:38:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65571</guid><dc:creator>pamam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65571.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65571</wfw:commentRss><description>&lt;p&gt;Hilary,&lt;/p&gt;
&lt;p&gt;In my world that does not work.&amp;nbsp; This works&lt;/p&gt;
&lt;p&gt;&amp;nbsp;set dataObj = XDocument.DataObjects(&amp;quot;GetDatePlusDays&amp;quot;) &lt;/p&gt;
&lt;p&gt;but &lt;/p&gt;
&lt;p&gt;&amp;nbsp;set dataObj = XDocument.DataObjects(&amp;quot;GetDatePlusDays&amp;quot;).QueryAdapter&lt;/p&gt;
&lt;p&gt;does not work.&amp;nbsp; I always get an error of &amp;quot;object does not supported property or method&amp;quot; &lt;/p&gt;
&lt;p&gt;I can see it in the DOM but the compiler in InfoPath does not see it.&amp;nbsp; could I need another service pace or something.&amp;nbsp; I&amp;#39;m running into this with other objects as well.&lt;/p&gt;</description></item><item><title>Re: Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65567.aspx</link><pubDate>Tue, 29 Mar 2011 18:04:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65567</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65567.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65567</wfw:commentRss><description>&lt;p&gt;You&amp;#39;ll see from the MSDN link I referenced that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For secondary data sources, the &lt;strong&gt;WebServiceAdapter&lt;/strong&gt; object is accessible through the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb250842(v=office.12).aspx"&gt;&lt;font color="#1364c4"&gt;QueryAdapter&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt; property of the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb229846(v=office.12).aspx"&gt;&lt;font color="#1364c4"&gt;DataObject&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt; object, and &lt;strong&gt;DataObject&lt;/strong&gt; objects are accessible through the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb229910(v=office.12).aspx"&gt;&lt;font color="#1364c4"&gt;DataObjects&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt; property of the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb229879(v=office.12).aspx"&gt;&lt;font color="#1364c4"&gt;XDocument&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt; object.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The code sample shows that you&amp;#39;d want:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set dataObj = XDocument.DataObjects(&amp;quot;GetDatePlusDays&amp;quot;).&lt;strong&gt;QueryAdapter&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I don&amp;#39;t see a Connection property in MSDN? But I do see a Name&amp;nbsp;property -- so you should be able to get the name with:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;dataObj.Name&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65563.aspx</link><pubDate>Tue, 29 Mar 2011 16:39:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65563</guid><dc:creator>pamam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65563.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65563</wfw:commentRss><description>&lt;p&gt;Thanks Hilary, that was very informative.&amp;nbsp; I had no idea that these options were available.&lt;/p&gt;
&lt;p&gt;****&amp;nbsp;&lt;/p&gt;
&lt;p&gt;set dataObj = XDocument.DataObjects(&amp;quot;GetDatePlusDays&amp;quot;)&lt;/p&gt;
&lt;p&gt;XDocument.UI.Alert( &amp;quot;DataObjects Connection: &amp;quot; &amp;amp; dataObj.WebServiceAdapter.Connection.Name ) &lt;/p&gt;
&lt;p&gt;****&lt;/p&gt;
&lt;p&gt;The GetDatePlusDays is a webservice secondary datasource.&amp;nbsp; The only adpater that seems to work is Adpater.&lt;/p&gt;
&lt;p&gt;The actual error message is the the object does not support this property or method.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Mel&lt;/p&gt;</description></item><item><title>Re: Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65561.aspx</link><pubDate>Tue, 29 Mar 2011 16:24:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65561</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65561.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65561</wfw:commentRss><description>&lt;p&gt;Hi and welcome --&lt;/p&gt;
&lt;p&gt;It would be helpful to know what version of InfoPath you are using. For 2007 and above, you can right click a field or group in the data source task pane and select &amp;quot;Copy XPath&amp;quot; to get the XPath to a node. &lt;/p&gt;
&lt;p&gt;According to &lt;a href="http://msdn.microsoft.com/en-us/library/bb229877(v=office.12).aspx" target="_blank"&gt;MSDN&lt;/a&gt;, the WebServiceAdapter has been with us since IP 2003. The line of code you get the error on may help us help you debug it. &lt;/p&gt;
&lt;p&gt;If you save your form as source files, you can look at the sampledata.xml file to see the namespace prefixes for your different data sources (if you are using IP 2003 and don&amp;#39;t have the Copy XPath functionality). You can also find the XPath to fields using the formula editor (click the box that says &amp;quot;Edit XPath&amp;quot; to display the full XPath).&lt;/p&gt;</description></item><item><title>Accessing dataObject outputs and controls programmatically</title><link>https://www.infopathdev.com:443/forums/thread/65560.aspx</link><pubDate>Tue, 29 Mar 2011 16:15:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65560</guid><dc:creator>pamam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65560.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=65560</wfw:commentRss><description>&lt;p&gt;My system is Infopath 2003 SP1? Windows XP SP3 in conjuction with SharePoint; however I just now working&amp;nbsp;with InfoPath separately.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It is difficult to find out what the XPath is for a control or dataObject input or output.&lt;/p&gt;
&lt;p&gt;I also noticed that some of the DataObject Adapters are not available.&amp;nbsp; When I try to use WebServiceAdapter I get a syntax error &amp;quot;not supported object&amp;quot; or something to that affect.&lt;/p&gt;
&lt;p&gt;Knowing what prefixes to use on the XPath would be a great help.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I would appreciate any help.&lt;/p&gt;
&lt;p&gt;Mel&lt;/p&gt;</description></item></channel></rss>