<?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: Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46161.aspx</link><pubDate>Sun, 23 Aug 2009 19:33:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46161</guid><dc:creator>RhysAZ</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46161</wfw:commentRss><description>&lt;p&gt;Thanks qazi_anis. I&amp;#39;ll give it a try and let you know how it turns out.&lt;/p&gt;</description></item><item><title>Re: Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46157.aspx</link><pubDate>Sun, 23 Aug 2009 10:09:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46157</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46157.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46157</wfw:commentRss><description>&lt;p&gt;if u have more than one rule. then u might consider option of appending some value to it &lt;/p&gt;
&lt;p&gt;suppose on firing of ur rule 1 set the value of (say areRulesFiredto1) &lt;/p&gt;
&lt;p&gt;on firing of ur rule 2 append (2) to it so that&amp;nbsp;new value is (12) &lt;/p&gt;
&lt;p&gt;similar for all your rules &lt;/p&gt;
&lt;p&gt;and in the code just check if the value is equal to (&amp;quot;123..n&amp;quot;) &lt;/p&gt;
&lt;p&gt;hope this solves the problem&lt;/p&gt;</description></item><item><title>Re: Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46156.aspx</link><pubDate>Sun, 23 Aug 2009 10:03:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46156</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46156.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46156</wfw:commentRss><description>&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xntemp = &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;p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xnDoc = &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;/p&gt;xnDoc = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;xntemp = xnDoc.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:areRulesFired&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;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;if ( xntemp.toString().equals(&amp;quot;RulesFired&amp;quot;))&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;//write your code here &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;// If this does not solve the problem attach the xsn and the cs file and i will try to resolve it for you&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46149.aspx</link><pubDate>Sat, 22 Aug 2009 15:38:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46149</guid><dc:creator>RhysAZ</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46149.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46149</wfw:commentRss><description>&lt;p&gt;Just so I think I understand you correctly,&amp;nbsp;at the end of&amp;nbsp;each successful&amp;nbsp;rule place a &amp;quot;set the value of&amp;nbsp;&amp;quot;&amp;nbsp;the (newly added) field&amp;nbsp;called &amp;quot;areRulesFired&amp;quot; to&amp;nbsp;&amp;quot;RulesFired&amp;quot; text&amp;nbsp;. Then the code would look for the &amp;quot;RulesFired&amp;quot; text in the &amp;quot;areRulesFired&amp;quot; field.&amp;nbsp;And if it finds it, then the code runs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;the &amp;quot;RulesFired&amp;quot; text is not in the&amp;nbsp;&amp;nbsp;&amp;quot;areRulesFired&amp;quot; field, the code doesn&amp;#39;t run. Is my thinking correct?&lt;/p&gt;
&lt;p&gt;And if it is, can you please give me an example of what the line of code would look like and tell me where to put that line of code,&amp;nbsp;in the code (in the beginning or in the middle or at the end)? &lt;/p&gt;
&lt;p&gt;Thanks qazi_anis &lt;/p&gt;</description></item><item><title>Re: Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46141.aspx</link><pubDate>Sat, 22 Aug 2009 10:12:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46141</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46141.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46141</wfw:commentRss><description>&lt;p&gt;if the rules are met, place some particular value (say &amp;quot;RulesFired&amp;quot;)&amp;nbsp;in a fied (say &amp;quot;areRulesFired&amp;quot;), and in the code check for the value. if the &amp;quot;areRulesFired&amp;quot; field does not have value &amp;quot;RulesFired&amp;quot; dont execute the code. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Stop code running if rules are not met in a button</title><link>https://www.infopathdev.com:443/forums/thread/46137.aspx</link><pubDate>Fri, 21 Aug 2009 20:36:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46137</guid><dc:creator>RhysAZ</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46137.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=46137</wfw:commentRss><description>&lt;p&gt;Hi- I have a button with rules in it. I have code behind the rules. How can I stop the code from firing if certain rules are not met. Thanks.&lt;/p&gt;</description></item></channel></rss>