<?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: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35907.aspx</link><pubDate>Wed, 17 Dec 2008 13:38:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35907</guid><dc:creator>Ulk31</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35907.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35907</wfw:commentRss><description>&lt;p&gt;Yeah, it works! Thank you very much for your help! The information to look in the template.xml helps a lot!&lt;/p&gt;
&lt;p&gt;for&amp;nbsp;others...&amp;nbsp;this is my running code now:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&lt;br /&gt;XDocument.View.ExecuteAction(&amp;quot;xCollection::insert&amp;quot;, &amp;quot;tbl_UserRow_11&amp;quot;);&lt;br /&gt;var userRowNode = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/tns:getInstanceResponse/tns:getInstanceResult/workitem/tbl_User/tbl_UserRow&amp;quot;);&lt;br /&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserType&amp;quot;).text = &amp;quot;Value of user type&amp;quot;;&lt;br /&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserComment&amp;quot;).text = &amp;quot;Value of user comment&amp;quot;; &lt;br /&gt;&amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;My next step is to figure out how to&amp;nbsp;select the other rows out of&amp;nbsp;the tbl_User and not only the first . But I&amp;#39;ll try to find this information in this forum.&lt;/p&gt;
&lt;p&gt;Thank&amp;#39;s a lot again!&lt;br /&gt;Regards, Ulk&lt;/p&gt;</description></item><item><title>Re: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35902.aspx</link><pubDate>Wed, 17 Dec 2008 12:58:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35902</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35902.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35902</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You will get these namespace in your template.xml and myschema.xsd files. In these files you have structured and with prefix of the node names. Those namespace prefixes might be change in code also.&lt;/p&gt;
&lt;p&gt;If you are using InfoPath 2007,&lt;/p&gt;
&lt;p&gt;Open form in Design mode.&lt;/p&gt;
&lt;p&gt;Go to View -&amp;gt; Data Source.&lt;/p&gt;
&lt;p&gt;Select your field and right click on that field.&lt;/p&gt;
&lt;p&gt;Select ‘Copy XPath&amp;#39; option to select the path of the field.&lt;/p&gt;
&lt;p&gt;Paste into notepad or in your formcode.cs file.&lt;/p&gt;
&lt;p&gt;Go through the below links,&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lists.xml.org/archives/xml-dev/200507/msg00199.html"&gt;http://lists.xml.org/archives/xml-dev/200507/msg00199.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb531390.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb531390.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35895.aspx</link><pubDate>Wed, 17 Dec 2008 09:42:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35895</guid><dc:creator>Ulk31</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35895.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35895</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;ok, I went through the links. My code looks like this now:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&lt;br /&gt;XDocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:q=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/queryFields&amp;quot; xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-08T23:17:48&amp;quot; xmlns:xd=&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot; xmlns:tns=&amp;quot;http://tempuri.org/&amp;quot;&amp;#39;);&lt;/p&gt;
&lt;p&gt;var userRowNode = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/dfs:dataFields/tns:getInstanceResponse/tns:getInstanceResult/d:workitem/d:tbl_User/d:tbl_UserRow&amp;quot;);&lt;br /&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserType&amp;quot;).text = &amp;quot;Value of user type&amp;quot;; &lt;br /&gt;&amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;The issue &amp;quot;not declared namespace-prefix: &amp;#39;d&amp;#39;&amp;quot; seems to be solved but running the next line throws &amp;quot;&amp;#39;null&amp;#39; or not an object&amp;quot;. Therefore I think something must be wrong in the xpath - right?&lt;/p&gt;
&lt;p&gt;Do you know where I can get information about the structure of a xpath? I don&amp;#39;t know in which case I have to use my:, dfs:, tns: or d:.&lt;/p&gt;
&lt;p&gt;Thank you very much for your help!&lt;br /&gt;Regards Ulk&lt;/p&gt;</description></item><item><title>Re: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35840.aspx</link><pubDate>Tue, 16 Dec 2008 17:56:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35840</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35840.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35840</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Go through the below link once,&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/6196/22882.aspx#22882"&gt;http://www.infopathdev.com/forums/p/6196/22882.aspx#22882&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/1319/6402.aspx#6402"&gt;http://www.infopathdev.com/forums/p/1319/6402.aspx#6402&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35834.aspx</link><pubDate>Tue, 16 Dec 2008 17:14:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35834</guid><dc:creator>Ulk31</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35834.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35834</wfw:commentRss><description>&lt;p&gt;Hi Shiva,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thank you very much for your quick response. I tried it, but I get the error:&lt;/p&gt;
&lt;p&gt;&amp;quot;not declared namespace-prefix: &amp;#39;d&amp;#39;&amp;quot;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;something must be wrong at the end of the xpath&lt;br /&gt;...tns:getInstanceResult/d:workitem/d:tbl_User/d:tbl_UserRow&amp;quot;&lt;/p&gt;
&lt;p&gt;Do you have any idea?&lt;/p&gt;
&lt;p&gt;Regards Ulk&lt;/p&gt;</description></item><item><title>Re: add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35833.aspx</link><pubDate>Tue, 16 Dec 2008 16:57:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35833</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35833.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35833</wfw:commentRss><description>&lt;p&gt;Hello Welcome to the Forums,&lt;/p&gt;
&lt;p&gt;Here is the code to add the new node to repeating node,&lt;/p&gt;
&lt;p&gt;Var userRowNode = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/dfs:dataFields/tns:getInstanceResponse/tns:getInstanceResult/d:workitem/d:tbl_User/d:tbl_UserRow&amp;quot;);&lt;/p&gt;
&lt;p&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserType&amp;quot;).text = &amp;quot;Value of user type&amp;quot;;&lt;/p&gt;
&lt;p&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserComment&amp;quot;).text = &amp;quot;Value of user comment&amp;quot;;&lt;/p&gt;
&lt;p&gt;userRowNode.selectSingleNode(&amp;quot;tbl_UserName&amp;quot;).text = &amp;quot;Value of user name&amp;quot;;&lt;/p&gt;
&lt;p&gt;Note: You have to check the prefix of above XPath should be correct and check once XPath also.&lt;/p&gt;</description></item><item><title>add values to repeating table of a WS with JScript, infopath 2003</title><link>https://www.infopathdev.com:443/forums/thread/35831.aspx</link><pubDate>Tue, 16 Dec 2008 16:39:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35831</guid><dc:creator>Ulk31</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35831.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=35831</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m albe to insert an new line with&lt;/p&gt;
&lt;p&gt;&amp;nbsp;XDocument.View.ExecuteAction(&amp;quot;xCollection::insert&amp;quot;, &amp;quot;tbl_UserRow_11&amp;quot;);&lt;/p&gt;
&lt;p&gt;but how can I add values to the fields of the new line?&lt;/p&gt;
&lt;p&gt;My primary datasource (implemented as a webservice) looks like this:&lt;br /&gt;&lt;br /&gt;- myFields&lt;br /&gt;&amp;nbsp; - dataFields&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - tns:getInstanceResponse&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - getInstanceResult&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - :workitem&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentUserId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentUserName&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - tbl_User&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - tbl_UserRow&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tbl_UserType&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tbl_UserComment&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tbl_UserName&lt;br /&gt;&lt;br /&gt;I seached a lot in this forum, but nothing&amp;nbsp;help.&lt;/p&gt;
&lt;p&gt;can anybody help?&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;Regards Ulk&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>