<?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: Having trouble getting infopath to sum values based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/102097.aspx</link><pubDate>Fri, 10 Apr 2015 15:16:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:102097</guid><dc:creator>zsazsa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/102097.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=102097</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;apologies for the formatting issues with my first post, don&amp;#39;t think chrome was very happy so fixed them in IE! &lt;/p&gt;</description></item><item><title>Having trouble getting infopath to sum values based on dropdown</title><link>https://www.infopathdev.com:443/forums/thread/102096.aspx</link><pubDate>Fri, 10 Apr 2015 15:12:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:102096</guid><dc:creator>zsazsa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/102096.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=102096</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m currently working on a specific type of expense form, where multiple expenses can be added for up to 8 people.

&lt;/p&gt;&lt;p&gt;For each of the expense amounts, the person completing the form should first of all select the type of expense from a dropdown. We have 6 different expense type values

I&amp;#39;m trying to create a financial summary page, which first of all sums all of the expenses per person. (So person 1 total, person 2 total etc)

&lt;/p&gt;&lt;p&gt;What I would also like to do is calculate each of the totals on a &amp;quot;per expense type&amp;quot; basis - so for example, add up all expense amounts where &amp;quot;meals&amp;quot; was selected as the expense type, and so on


I&amp;#39;ve tried to do this a few different ways but can&amp;#39;t get it to work.&lt;/p&gt;&lt;p&gt;&amp;nbsp;My first thought was to set a rule for each expense type on each of the expense type and expense amounts, where it would add the expense amount to the total - so for example, if meals is selected as expense type, then that expense amount should be added to the &amp;quot;meals total value&amp;quot; amount. However, this isn&amp;#39;t dynamic - if they accidentally select the wrong type, then the value would be incorrectly added to the wrong total, and then not removed when the expense type is corrected. Also, I didn&amp;#39;t like this one as it would have meant creating lots and lots of rules! 


&lt;/p&gt;&lt;p&gt;So that idea is scrapped. 


&lt;/p&gt;&lt;p&gt;I&amp;#39;ve now tried using the default value for the expense type total - below is an example of the formula I used for a different expense type as a test:
&lt;/p&gt;&lt;p&gt;

rep1Expense1Amount[rep1ExpenseType1 = &amp;quot;Baggage Allowance&amp;quot;] + rep1Expense2Amount[rep1ExpenseType2 = &amp;quot;Baggage Allowance&amp;quot;] + rep1Expense3Amount[rep1ExpenseType3 = &amp;quot;Baggage Allowance&amp;quot;] + rep1Expense4Amount[rep1ExpenseType4 = &amp;quot;Baggage Allowance&amp;quot;] + rep1Expense5Amount[rep1ExpenseType5 = &amp;quot;Baggage Allowance&amp;quot;]


&lt;/p&gt;&lt;p&gt;&amp;nbsp;However, when I test this, the value is showing as not a number. 


&lt;/p&gt;&lt;p&gt;I set the default value of all the expense amounts to zero, thinking this may help, but it hasn&amp;#39;t made a difference
&lt;/p&gt;&lt;p&gt;

Does anyone have any suggestions for how I can get this to work, and for it to dynamically reflect the correct value?&lt;/p&gt;</description></item></channel></rss>