<?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: Programmatically  designating a node as Required</title><link>https://www.infopathdev.com:443/forums/thread/14236.aspx</link><pubDate>Wed, 18 Jan 2006 02:26:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14236</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14236.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14236</wfw:commentRss><description>Instead of using just one node that you switch validation on and off of you could use two nodes and conditional formatting.&lt;br /&gt;&lt;br /&gt;Say you have two nodes such as &lt;br /&gt;dataCanBeBlank&lt;br /&gt;dataCannotBeBlank&lt;br /&gt;&lt;br /&gt;You can use conditional formatting and a helper node to determine which node is displayed. This would be "hide control when _helperNode_ equals true".&lt;br /&gt;&lt;br /&gt;The only tricky part about this is using two different nodes instead of two different controls referencing the same node.  Another way to do it would be to do data validation within your code, instead of embedding it within the XML schema. When a user tries to submit or save the form you can check to see if the field can or cannot be blank and if it cannot be blank, make sure that it is not. If the code discovers that there are errors you could then pop a message box and warn the user.&lt;br /&gt;&lt;br /&gt;I hope this helps, let us know if you have any more questions!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Programmatically  designating a node as Required</title><link>https://www.infopathdev.com:443/forums/thread/12752.aspx</link><pubDate>Tue, 17 Jan 2006 22:10:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12752</guid><dc:creator>Mkuhn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12752.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12752</wfw:commentRss><description>Based on a user's choice I need to set or unset a node as required "can not be blank".   I want ot do this programmatically using vb.net in Visual Studio.  Any ideas?&lt;br /&gt;&lt;br /&gt;M Kuhn</description></item></channel></rss>