<?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: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73511.aspx</link><pubDate>Thu, 05 Jan 2012 06:35:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73511</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73511.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73511</wfw:commentRss><description>&lt;p&gt;Please try this instead of RateExpiration.SetValue(string.Empty);&lt;/p&gt;
&lt;p&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; if (RateExpiration.MoveToFirstChild())&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RateExpiration.DeleteSelf();&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; }&lt;/p&gt;
&lt;p&gt;This will actually delete the text content instead of replacing it with blank text, which is a subtle difference in browser forms.&lt;/p&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73484.aspx</link><pubDate>Wed, 04 Jan 2012 20:00:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73484</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73484.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73484</wfw:commentRss><description>&lt;p&gt;I am still hitting a wall. I have found that the client doesnt act the same as the borwser form. after some more research and what already has been provided I came up with this&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (RateExpiration.HasAttributes)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (RateExpiration.GetAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager.LookupNamespace(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)) == &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;{&lt;br /&gt;RateExpiration.SetValue(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Empty);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;RateExpiration.CreateAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager.LookupNamespace(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;), &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;true&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
{&lt;br /&gt;RateExpiration.SetValue(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Empty);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
RateExpiration.CreateAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;nil&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager.LookupNamespace(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;), &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;true&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I test this in the client workes perfectly. When I run it in the browser the field (Date type) get a validation error. The red asterisk. I would like to put this to bed. any other suggestions?&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73331.aspx</link><pubDate>Thu, 29 Dec 2011 15:05:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73331</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73331.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73331</wfw:commentRss><description>&lt;p&gt;Sorry took so long to reply. &lt;/p&gt;
&lt;p&gt;Jimmy hope you have a great holiday.&lt;/p&gt;
&lt;p&gt;that worked perfectly, thanx&lt;/p&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73240.aspx</link><pubDate>Fri, 23 Dec 2011 19:39:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73240</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73240.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73240</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/15431/54705.aspx"&gt;http://www.infopathdev.com/forums/p/15431/54705.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73238.aspx</link><pubDate>Fri, 23 Dec 2011 18:26:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73238</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73238.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73238</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy. Would you mind sharing an easy way to do that? I know it would soething like &lt;/p&gt;
&lt;p&gt;@xsi:nill=true&lt;/p&gt;
&lt;p&gt;but I am not sure how to apply it.&lt;/p&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73236.aspx</link><pubDate>Fri, 23 Dec 2011 15:38:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73236</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73236.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73236</wfw:commentRss><description>&lt;p&gt;If the fields are set to allow blank values, then you will most likely get a validation error unless you re-add the xsi:nil attribute after setting them to blank.&lt;/p&gt;</description></item><item><title>Re: SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73235.aspx</link><pubDate>Fri, 23 Dec 2011 15:32:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73235</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73235.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73235</wfw:commentRss><description>&lt;p&gt;nevermind, not really sure what I missed, but set both values to string.Empty and it&amp;#39;s working.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks and enjoy&lt;/p&gt;</description></item><item><title>SetValue Blank for date type and double</title><link>https://www.infopathdev.com:443/forums/thread/73234.aspx</link><pubDate>Fri, 23 Dec 2011 15:19:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73234</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73234.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73234</wfw:commentRss><description>&lt;p&gt;I have a 2010 browser form (c#). some of the work in the form requires the fields values to be cleared. Is there an easy way to set a section of fields to blank? also I have to fields I can set to blank without IP bitting back&lt;/p&gt;
&lt;p&gt;Date field I have tried&lt;/p&gt;
&lt;p&gt;RateEffective.DeleteSelf(); &lt;/p&gt;
&lt;p&gt;RateEffective.SetValue(&amp;quot;&amp;quot;); &lt;/p&gt;
&lt;p&gt;RateEffective.SetValue(null); &lt;/p&gt;
&lt;p&gt;RateEffective.SetValue(string.Empty);&lt;/p&gt;
&lt;p&gt;although the field is set to blank on most of these IP throws a validaton error on the field as if user enterend invalid data and the form will not save.&lt;/p&gt;
&lt;p&gt;Also have a similar issue on a number field set to double, currency. I was forced to set it to 0, but I would rahter have it blank.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks and happy holidays&lt;/p&gt;</description></item></channel></rss>