<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15697.aspx</link><pubDate>Thu, 25 Aug 2005 11:33:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15697</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15697.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15697</wfw:commentRss><description>Hi sorry for being late,&lt;br /&gt;You need to convert value into an integer before adding anything to it.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15696.aspx</link><pubDate>Sun, 21 Aug 2005 19:15:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15696</guid><dc:creator>andywt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15696.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15696</wfw:commentRss><description>Thanks again, however more questions, sorry to be so persistent.  What I am ultimately trying to do is find the Last_Used field from the ProjectCategory secondary list that matched the ProjectCategoryCode (field from my Main Form), increment it by one and write the updated Last_Used back to my secondary data source.&lt;br /&gt;&lt;br /&gt;This is relatively straight forward within Infopath but I have to do it in VB code to insure that all the validation has occured.&lt;br /&gt;Here is what I have done based on your info, but VB does not like the way I was trying to do the query in the selectSingleNode.  Any ideas?&lt;br /&gt;&lt;br /&gt;    Dim LastUsed As IXMLDOMDocument2 = e.XDocument.GetDOM("Project Category")&lt;br /&gt;    LastUsed.setProperty("SelectionNamespaces", "Namespace")&lt;br /&gt;    LastUsed.selectSingleNode("/dfs:myFields/dfs:dataFields/dfs:ProjectCategory[@Project_Category='" &amp; projectCategoryCode &amp; "']")&lt;br /&gt;    LastUsed.nodeTypedValue = LastUsed.nodeTypedValue + 1&lt;br /&gt;    submit = thisXDocument.DataAdapters.Item("Submit ProjectUpdate")&lt;br /&gt;    submit.Submit()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15695.aspx</link><pubDate>Sun, 21 Aug 2005 17:37:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15695</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15695.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15695</wfw:commentRss><description>You have to use&lt;br /&gt;dim secField as IXMLDOMDocument2 = e.XDocument.DOM.selectSingleNode("/my:myFields/my:dataFields/my:ProjectCategory/my:Last_Used")&lt;br /&gt;&lt;br /&gt;to select "Last_Used" node.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15694.aspx</link><pubDate>Sun, 21 Aug 2005 16:34:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15694</guid><dc:creator>andywt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15694.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15694</wfw:commentRss><description>Thanks again you have been mose helpful.  I am still a bit confused.  My secondary source has a Infodath default structure of: myfields/mydata/ProjectCategory/Last_Used.  To Dim "Last_Used" to use in my code would i do this?&lt;br /&gt;&lt;br /&gt;     projectCategory.selectSingleNode("/my:myFields/my:dataFields/my:ProjectCategory)&lt;br /&gt;&lt;br /&gt;dim secField as IXMLDOMDocument2 = e.XDocument.DOM.selectSingleNode("/my:myFields/my:dataFields/my:ProjectCategory/my:Last_Used")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by Agni&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;For primary DOM Namespace is set at the top of your code, this is taken care by Visual studio/InfoPath.&lt;br /&gt;You can see this it starts with "&amp;lt;InfoPathNamespace..."&lt;br /&gt;&lt;br /&gt;For secondary doms you have to take care of all those things.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15693.aspx</link><pubDate>Sun, 21 Aug 2005 15:57:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15693</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15693.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15693</wfw:commentRss><description>For primary DOM Namespace is set at the top of your code, this is taken care by Visual studio/InfoPath.&lt;br /&gt;You can see this it starts with "&amp;lt;InfoPathNamespace..."&lt;br /&gt;&lt;br /&gt;For secondary doms you have to take care of all those things.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15692.aspx</link><pubDate>Sun, 21 Aug 2005 15:35:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15692</guid><dc:creator>andywt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15692</wfw:commentRss><description>Agni, Thanks for the help.  One question on your reply.  I did not have to explicitly set the namespace on the primary DOM, so why do I have yo on the secondary DOM? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by Agni&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Hi andywt,&lt;br /&gt;If it is a secondary DOM you need to get that dom and then select a node from that. &lt;br /&gt;You also have to set namespace property for that node &lt;br /&gt;&lt;br /&gt;Dim projectCategory As IXMLDOMDocument2 = e.XDocument.GetDOM("Project Category")&lt;br /&gt;projectCategory.setProperty("SelectionNamespaces", "Namespace")&lt;br /&gt;projectCategory.selectSingleNode("/my:projectList/my:typeofProject")&lt;br /&gt;&lt;br /&gt;//Namespace should have references to all namespaces  used in that "Project Category" dataconnection&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15691.aspx</link><pubDate>Sun, 21 Aug 2005 08:53:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15691</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15691.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15691</wfw:commentRss><description>Hi andywt,&lt;br /&gt;If it is a secondary DOM you need to get that dom and then select a node from that. &lt;br /&gt;You also have to set namespace property for that node &lt;br /&gt;&lt;br /&gt;Dim projectCategory As IXMLDOMDocument2 = e.XDocument.GetDOM("Project Category")&lt;br /&gt;projectCategory.setProperty("SelectionNamespaces", "Namespace")&lt;br /&gt;projectCategory.selectSingleNode("/my:projectList/my:typeofProject")&lt;br /&gt;&lt;br /&gt;//Namespace should have references to all namespaces  used in that "Project Category" dataconnection&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>VB and Secondary Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/15272.aspx</link><pubDate>Sun, 21 Aug 2005 01:26:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15272</guid><dc:creator>andywt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15272.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15272</wfw:commentRss><description>I am integrating InfoPath with Sharepoint and have several Secondary data sources.  One of my secondary sources contains a field that I access to inside some Visual Basic code. To access a field on my main form I use:&lt;br /&gt;   Dim projectType As IXMLDOMNode = e.XDocument.DOM.selectSingleNode&lt;br /&gt;       ("/my:projectList/my:typeofProject")&lt;br /&gt;&lt;br /&gt;What is the equivalent code to access a field on a secondary data source named "Project Category"?&lt;br /&gt;&lt;br /&gt;Many thanks.&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>