<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Fire rules on a control via code</title><link>https://www.infopathdev.com:443/forums/thread/29165.aspx</link><pubDate>Wed, 04 Jun 2008 15:47:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29165</guid><dc:creator>Michael Vasquez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29165.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29165</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Could you show a sample of code you did to do the above.&amp;nbsp; I want to be able to run a rule when I click on a button to run a rule.&lt;/p&gt;&lt;p&gt;&amp;nbsp;TIA&amp;nbsp;&amp;nbsp;  &lt;/p&gt;&lt;p&gt;Mike&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Fire rules on a control via code</title><link>https://www.infopathdev.com:443/forums/thread/29041.aspx</link><pubDate>Thu, 29 May 2008 18:47:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29041</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29041.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29041</wfw:commentRss><description>&lt;p&gt;I tried that approach but was unsuccessful. The problem is the user may open the form without toggling the control. If the control isn&amp;#39;t toggled, the link will still be the old value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I found a solution where OnLoad, I set the value of the control to itself (if initially not null) . This &amp;quot;jolts&amp;quot; the control&amp;#39;s rule to fire which in turn updates the link.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for the response!&lt;/p&gt;</description></item><item><title>Re: Fire rules on a control via code</title><link>https://www.infopathdev.com:443/forums/thread/29019.aspx</link><pubDate>Thu, 29 May 2008 13:10:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29019</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29019.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29019</wfw:commentRss><description>&lt;p&gt;I would either put this in a rule or onchange for the dropdown or make the defualt value for the hyperlink based upon the dropdown value and have it update automatically.&lt;/p&gt;
&lt;p&gt;You have a field for the hyperlink text and are then using that field for the hyperlink path correct?&lt;/p&gt;</description></item><item><title>Fire rules on a control via code</title><link>https://www.infopathdev.com:443/forums/thread/29006.aspx</link><pubDate>Wed, 28 May 2008 20:35:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29006</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29006.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29006</wfw:commentRss><description>&lt;p&gt;I have a pull down control that sets an attribute&amp;#39;s value based on the selection. This attrribute is referenced by a hyperlink. &lt;/p&gt;
&lt;p&gt;Example: If &amp;quot;Apples&amp;quot; is selected in the pull down, a rule tells the link to point to an apples website. If &amp;quot;Oranges&amp;quot; is selected in the pull down, a rule tells the link to point to an oranges website. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;The problem is if I update the template and re-open the form, the form doesn&amp;#39;t update its link OnOpen. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there a way to run all the control&amp;#39;s rules on a loadevent? Below, the control is called FruitSelection.&lt;/p&gt;
&lt;p&gt;function msoxd_my_FruitSelection::OnLoad(eventObj) &lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do I just toggle it manually using code?&lt;/p&gt;</description></item></channel></rss>