<?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: How do you call out a data connection in form code?</title><link>https://www.infopathdev.com:443/forums/thread/35743.aspx</link><pubDate>Sat, 13 Dec 2008 13:15:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35743</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35743.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35743</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Here is the code to get the secondary data connections,&lt;/p&gt;
&lt;p&gt;DataConnection aa = this.DataConnections[&amp;quot;Data connection name&amp;quot;].Execute();&lt;/p&gt;
&lt;p&gt;//Get the navigator for above data source&lt;/p&gt;
&lt;p&gt;XPathNavigator dataSource = this.DataSources[&amp;quot;Data connection name&amp;quot;].CreateNavigator();&lt;/p&gt;
&lt;p&gt;//Get the node&lt;/p&gt;
&lt;p&gt;XmlNode selectedNode = dataSource.SelectSingleNode(&amp;quot;XPath of the field&amp;quot;);&lt;/p&gt;
&lt;p&gt;To implementation of workflow, you have to add the code while submitting the form you have to change the form status ID and status name. These two fields are related to workflow. Depends on these field values you have to change next status.&lt;/p&gt;</description></item><item><title>How do you call out a data connection in form code?</title><link>https://www.infopathdev.com:443/forums/thread/35735.aspx</link><pubDate>Fri, 12 Dec 2008 16:06:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35735</guid><dc:creator>punkn00dlez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35735.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35735</wfw:commentRss><description>&lt;p&gt;I guess the subject explains it all, but I want to give some background.&amp;nbsp; I have multiple secondary data connections, all set up to submit via e-mail.&amp;nbsp; I know I have to set my buttons up to use Rules and Custom Code because there&amp;#39;s multiple buttons.&amp;nbsp; That being said, I&amp;#39;ve tried &lt;/p&gt;
&lt;p&gt;function CTRL75_7::OnClick(eventObj)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;DataConnections[&amp;quot;Main Connection&amp;quot;].Execute();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This however causes an error, so obviously it&amp;#39;s not right.&amp;nbsp; What&amp;#39;d I&amp;#39;d really like to do is find out how to automatically start a workflow with a single submit button, I feel that will work better as opposed to the makeshift workflow I have now, but even with that, I&amp;#39;ll still need to know how to call out a data connection in the form code.&lt;/p&gt;</description></item></channel></rss>