Add Total Expense Report entries to GL Entries at bottom of form - InfoPath Dev
in

InfoPath Dev

Add Total Expense Report entries to GL Entries at bottom of form

Last post 05-14-2007 02:02 PM by paustin. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-11-2007 12:56 PM

    Add Total Expense Report entries to GL Entries at bottom of form

    I am starting with the InfoPath Expense Report template.  I have added a section at the bottom of the form, that has a GL entry for every category that can be chosen in the Itemized Expenses section. What would be the easiest way to get the total of the amounts for each "category" chosen in the Itemized Expenses section and put that total in my new GL section? 

     It didn't work to set a condition on the "amount" in the Itemized Expenses section and say Sum(amount) for category = "entertainment" because it sums all the amounts for all the expense items.  If I add VB code to the changed event for the "amount" column in the Itemized Expenses section, and have it create variables for each category and add the amounts for each when they are entered, I don't know how to get the data from the variable to new the GL section.

    Patty
  • 05-11-2007 01:17 PM In reply to

    Re: Add Total Expense Report entries to GL Entries at bottom of form

    I kept searching and found in another blog the answer I needed.  In the blog I found how to reference a particular row in a repeating table based on a condition.

    In the GL amount expression box data source, I used sum(/my:myFields/my:group1/my:group2[my:category = "entertainment"]/my:amount)

     

    Thank you Matt Faus!

    Patty
  • 05-14-2007 02:02 PM In reply to

    Re: Add Total Expense Report entries to GL Entries at bottom of form

    Now I need to go a step further.

    For each expense item entry, I have added a dept # column. 

    In the GL total section I added at the bottom of the form, I still need to sum the amounts of the expenses grouped by the category.  But in addition to that, I need to also group by dept # within the category.  So, in the GL section I have added, the "entertainment" category is summed, but I also need a sum of each entertainment entry for each dept # that was entered.  I can't add a test for individual dept #'s because there are too many of them.

    Any ideas? I would prefer to do it without coding.  I have done a lot of coding in Access VBA, but I haven't figured out the coding behind the infopath forms yet.  If I have to add code to loop through all the expenses and sum all amounts for different depts that way, I don't know how to return the summed amount to the GL section of the form.  (I actually don't know how to code any of it, but am hoping I can find examples on how to loop through the expense items and create memory varaibles for the values I need).

    Patty
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.