<?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: Clearing fields</title><link>https://www.infopathdev.com:443/forums/thread/2570.aspx</link><pubDate>Fri, 09 Jun 2006 14:04:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2570</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2570.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2570</wfw:commentRss><description>Matt, thanks for your response.&lt;br /&gt;&lt;br /&gt;That is a good idea with the xml file. I have tried to do it with (js) code. I have fields called fielda1 through to fielda61 and I have tried to change the values with the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var i = 1;&lt;br /&gt;while ( i &amp;lt;= 61 )&lt;br /&gt;   {&lt;br /&gt;	var fieldaTitle = "//my:fielda" &amp; i;&lt;br /&gt;	XDocument.DOM.selectSingleNode(fieldaTitle).text = "";&lt;br /&gt;    i++;&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The error I get below relates to the line XDocument.DOM.....&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;br /&gt;Expression must evaluate to a node-set.&lt;br /&gt;--&amp;gt;0&amp;lt;--&lt;br /&gt;File:script.js&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;I have used the structure of code to copy all of these fields to a repeating group so I do not understand why this fails here. Any ideas? Or should I give it up and use the method suggested with secondary data-source?</description></item><item><title>Re: Clearing fields</title><link>https://www.infopathdev.com:443/forums/thread/2569.aspx</link><pubDate>Fri, 09 Jun 2006 02:52:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2569</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2569</wfw:commentRss><description>My suggestion here would be to create an XML file that has all of the nodes as  blank and then add this as a secondary data source. When you want to clear all of the fields simply select the root node of the 2DS and the parent of the root node in the main dom and do parent.replaceChild( newChild, oldChild ).&lt;br /&gt;&lt;br /&gt;I hope this helps, there is a little more information in the SDKs! What language are you programming in? I might be able to provide an example myself.</description></item><item><title>Clearing fields</title><link>https://www.infopathdev.com:443/forums/thread/1351.aspx</link><pubDate>Thu, 08 Jun 2006 22:35:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1351</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1351.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1351</wfw:commentRss><description>I have a view used to gather information. On completion the data is copied to a repeatig group. I want then to clear all the field values before the view is changed.&lt;br /&gt;&lt;br /&gt;I have all the code except that required to clear each field (there are over 70). Can anyone help?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;Paul</description></item></channel></rss>