<?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: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13433.aspx</link><pubDate>Sat, 06 Aug 2005 01:03:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13433</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13433.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13433</wfw:commentRss><description>Hi Smaur,&lt;br /&gt;There are many similar posts on this site, you can search for replace keyword. &lt;br /&gt;Or you can modify the code in&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=552&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=552&lt;/a&gt;&lt;br /&gt;to suit your needs.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13432.aspx</link><pubDate>Fri, 05 Aug 2005 19:31:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13432</guid><dc:creator>smaur</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13432.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13432</wfw:commentRss><description>Hi Agni,&lt;br /&gt;I've spent the better part of the day trying to figure this one out, I'd appreciate a little more guidance on what that code should look like.&lt;br /&gt;Thanks</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13431.aspx</link><pubDate>Fri, 05 Aug 2005 18:50:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13431</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13431.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13431</wfw:commentRss><description>Hi Smaur,&lt;br /&gt;The values that you want to empty are in the attributes, and you are trying to empty the nodes which donot have any data.&lt;br /&gt;&lt;br /&gt;Try to replace whole of the node with totally new one, with the help of code.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13430.aspx</link><pubDate>Fri, 05 Aug 2005 17:22:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13430</guid><dc:creator>smaur</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13430.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13430</wfw:commentRss><description>Patrick,&lt;br /&gt;Thanks,&lt;br /&gt;that makes more sense, but it still does'nt clear the fields. Although it took care of the error message.&lt;br /&gt;The resulting effect is that the entire form is highlighted, but the data remains.&lt;br /&gt;</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13429.aspx</link><pubDate>Fri, 05 Aug 2005 16:22:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13429</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13429.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13429</wfw:commentRss><description>Hi Smaur,&lt;br /&gt;attributes are not sets of nodes, right? If you remove the "/@ReqID" from your XPath what do you get?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13428.aspx</link><pubDate>Fri, 05 Aug 2005 12:36:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13428</guid><dc:creator>smaur</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13428.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13428</wfw:commentRss><description>Hi Patrick, &lt;br /&gt;Thanks for you reply&lt;br /&gt;Yes That is what I'd like to do, but I'm new to jscript. There is data from two tables on the form, and I was hoping there was a simple way without having to clear each field individually. I tried the code below, tho it didn't seem right, hoping the error msg would give more clues:&lt;br /&gt;var objXMLNode;&lt;br /&gt;  objXMLNode = XDocument.DOM.selectSingleNode("//dfs:myFields/dfs:dataFields/d:tblRequests/@ReqID");&lt;br /&gt;  XDocument.View.SelectNodes(objXMLNode);&lt;br /&gt; &lt;br /&gt;error message is:&lt;br /&gt;"Either the combination of values for the View.SelectNodes call is an invalid selection, or the values are not defined for this view, defined for this view more than once, or not selectable in the view."&lt;br /&gt;Thanks again&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/13427.aspx</link><pubDate>Fri, 05 Aug 2005 05:23:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13427</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13427.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13427</wfw:commentRss><description>Hi Smaur,&lt;br /&gt;You are obviously using code. How about just using code to clear the DOM?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Clearing the current form</title><link>https://www.infopathdev.com:443/forums/thread/12521.aspx</link><pubDate>Thu, 04 Aug 2005 20:43:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12521</guid><dc:creator>smaur</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12521.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12521</wfw:commentRss><description>I have a button on my form to switch views with code behind it per below:&lt;br /&gt;&lt;br /&gt;XDocument.View.SwitchView("RequestInput");&lt;br /&gt;&lt;br /&gt;When you click the button, the fields are prepopulated with data from the previous query, this is fine for most cases, but for this particular button I want the user to be able to access a view where they can input a new record. How do I clear this existing data programatically allowing the user to work on a New Record where all the fields are blank?&lt;br /&gt;&lt;br /&gt;If I use the "New Record" action in the Button Properties dialog a dialog box pops up warning the user "This action will delete all information on the current form", and then the have to click yes to continue.&lt;br /&gt;&lt;br /&gt;I would like this "RequestInput" form to come up without being prepopulated, and without the user having to deal with the warning dialog box.&lt;br /&gt;Thanks.&lt;br /&gt;</description></item></channel></rss>