<?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: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/122951.aspx</link><pubDate>Fri, 08 May 2020 15:35:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122951</guid><dc:creator>DS7298</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/122951.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=122951</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I liked your answer and was wondering how I would do a similar thing. I need the dropdown selection to simply fill a textbox the&amp;nbsp;selection chosen.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74510.aspx</link><pubDate>Tue, 24 Jan 2012 19:43:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74510</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74510.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74510</wfw:commentRss><description>&lt;p&gt;Thanks, that sounds a bit icky, I might just put the rule on the drop down 9as it is now) and add it to the last text box.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74434.aspx</link><pubDate>Mon, 23 Jan 2012 23:40:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74434</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74434.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74434</wfw:commentRss><description>&lt;p&gt;It seems to me that you could use a default value for &amp;quot;BalanceCollectBySupplier&amp;quot;, since ReceivedByOffice gets set to 0 in the first ruleset. I&amp;#39;d think that having BalanceCollectBySupplier default to TotalCost - ReceivedByOffice would be the same for either ruleset, right?&lt;/p&gt;
&lt;p&gt;So, the ReceivedByOffice rule seems to only need to be on this field - no other field change would affect it, right? That one would stay here....&lt;/p&gt;
&lt;p&gt;That leaves you with just the InvoiceThisOffice action.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a &lt;a href="http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;link&lt;/a&gt; to a blog post that talks about a way to create &amp;quot;conditional&amp;quot; default values. I&amp;#39;ll warn you that I had a performance issue with this method once - but it was being used in a field in a repeating section that had quite a few instances, and both conditions included some kind of complex math.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74428.aspx</link><pubDate>Mon, 23 Jan 2012 23:13:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74428</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74428.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74428</wfw:commentRss><description>&lt;p&gt;Anyway I could do this (see rules inspector in image) without having to cover every text box? Would be great to be able to refire the dropdown function when a textbox value is changed or onBlur but if this can&amp;#39;t be done i&amp;#39;ll need to cover backwards and forwards.... but preferably not having to attach these 2 rules to every textbox included in the formulas?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="WIDTH:454px;HEIGHT:278px;" title="Rules inspector" alt="Rules inspector" src="http://i41.tinypic.com/2ro3ui8.png" width="454" height="278" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74424.aspx</link><pubDate>Mon, 23 Jan 2012 21:59:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74424</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74424.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74424</wfw:commentRss><description>&lt;p&gt;You&amp;#39;d just need to add similar rules to your fields bound to the text boxes - rules only fire when the value of the field the rule is on &lt;em&gt;changes&lt;/em&gt;. You may also want to use a default value instead - but from your initial post, it sounds as if the calculation has conditions, so a default value may not be appropriate for your scenario.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74423.aspx</link><pubDate>Mon, 23 Jan 2012 21:38:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74423</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74423.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74423</wfw:commentRss><description>&lt;p&gt;One other thing....&lt;/p&gt;
&lt;p&gt;My drop down appears before the textboxes in the formula, the rules will only &amp;quot;fire&amp;quot; if the drop down box is used after the values have been entered into the form.&lt;br /&gt;Is there a way to tie the textboxes to the drop down in a way so that when they are changed or have values entered, the rules re-run?&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74310.aspx</link><pubDate>Fri, 20 Jan 2012 03:52:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74310</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74310.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74310</wfw:commentRss><description>&lt;p&gt;Glad it work! =)&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74309.aspx</link><pubDate>Fri, 20 Jan 2012 03:44:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74309</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74309</wfw:commentRss><description>&lt;p&gt;Thanks again, looks like we did almost the same thing. My rule said if = to this then set this field value.&lt;br /&gt;If that is not the case then the value is set using a formula on a different field.&lt;/p&gt;
&lt;p&gt;I will use your idea of having 2 rules on the drop down. That way it would be cleaner and less chance of rule 1 over writing formula 2 &lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74306.aspx</link><pubDate>Fri, 20 Jan 2012 03:36:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74306</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74306.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74306</wfw:commentRss><description>&lt;p&gt;No code, just rules. Right-click on the XSN on the location where you saved it and select Design. It will open InfoPath in design mode. Please check out the rules in the dropdown by&amp;nbsp;clicking on&amp;nbsp;the dropdown box and&amp;nbsp;then open&amp;nbsp;Manage Rules in the Home tab (that is, if you&amp;#39;re&amp;nbsp; using InfoPath 2010). In InfoPath 2007, you can right click on the dropdown and select Rules.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74305.aspx</link><pubDate>Fri, 20 Jan 2012 03:27:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74305</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74305.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74305</wfw:commentRss><description>&lt;p&gt;Thanks Jo-Anne.&lt;br /&gt;Was this done in code or using a rule?&lt;/p&gt;
&lt;p&gt;After I made my post I looked around some more and realised I could do this by adding a rule to the drop down. I&amp;#39;m not sure how to dismantle an xsn file so couldn&amp;#39;t look to see what you had done.&lt;/p&gt;</description></item><item><title>Re: Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74302.aspx</link><pubDate>Fri, 20 Jan 2012 03:04:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74302</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74302.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74302</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/jo-anne_alfafara/DropdownFormula.xsn"&gt;DropdownFormula.xsn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached a sample for you. &lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;</description></item><item><title>Formula based on drop down value</title><link>https://www.infopathdev.com:443/forums/thread/74297.aspx</link><pubDate>Fri, 20 Jan 2012 00:09:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74297</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74297.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=74297</wfw:commentRss><description>&lt;p&gt;I need to set a textbox value to be a simple calculation based on the value of a drop down box &lt;/p&gt;
&lt;p&gt;Normally I would code this as...&lt;/p&gt;
&lt;p&gt;if(dropdown == &amp;quot;refer&amp;quot;) {&lt;br /&gt;TotalCost = Rate*hours&lt;br /&gt;} else {&lt;br /&gt;TotalCost = Flatfee * 10&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Where TotalCost, Rate, hours and flatfee are textbox values&lt;br /&gt;I can set simple calculations/forumlas in Infopath but am not sure how to do the IF THEN ELSE logic within Infopath&lt;/p&gt;
&lt;p&gt;This will ultimately be a browser based form&lt;/p&gt;</description></item></channel></rss>