Help with a running total

Discussions for the HanDBase for iPad and it's conduits and desktop add-ons

Help with a running total

Postby Mando1493 » Mon Jun 16, 2014 2:47 pm

I created a DB to track my employees daily work productivity that they submit on their Daily Activity Reports. I subsequently need to submit a monthly report with individual totals for the month and totals for the whole unit. I was able to set up the calculations to input the daily amount followed with a Month to Date box that has the calculation formula. The problem I am having is that when I have the DB in list view, my last entry has the totals adding that entry with the previous record, regardless of who the employee is. It works fine if I search the DB for a specific employee. How do I set the DB to calculate a running total to individual employees and show the correct amount in the list view without having to search specific employees?
Mando1493
 
Posts: 21
Joined: Fri May 30, 2014 10:38 am

Re: Help with a running total

Postby Brian_Houghton » Thu Jun 19, 2014 7:37 am

Mando1493 wrote:I created a DB to track my employees daily work productivity that they submit on their Daily Activity Reports. I subsequently need to submit a monthly report with individual totals for the month and totals for the whole unit. I was able to set up the calculations to input the daily amount followed with a Month to Date box that has the calculation formula. The problem I am having is that when I have the DB in list view, my last entry has the totals adding that entry with the previous record, regardless of who the employee is. It works fine if I search the DB for a specific employee. How do I set the DB to calculate a running total to individual employees and show the correct amount in the list view without having to search specific employees?


Based on what you are describing as your needs, I encourage you to set up a custom view for each of your employees. Each view would need to include a filter so that it showed records for a particular employee. You could then easily switch between the records for each worker, and the calculations would use only the values included in the matching records.

Let me know if you need any help setting this up.

Sent from my Nexus 7 using Tapatalk HD
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Help with a running total

Postby shalom » Sat Nov 01, 2014 8:27 am

That method would limit the employees to a maximum of 20 if none of the views are used for anything else. This would be a prime reason to add a category filter type (like I mentioned in another post) that would appear on the same line with the list view selection. A popup field (which could be the Name field itself) would be assigned to it and the popup list could contain up to 60 employees and only use one view. That way the employee shown could be changed on the fly. This feature worked really well in SmartList, it would show records containing the specific value chosen, one of which was an automatic value of Unassigned if the field was empty, another automatic choice was All which would show all records no matter what the value of the field was.

Another option, set up a PrevEmp (calculated) field and load the employee from the previous record into it (at present this has to be a number field for Android because a text field can't be added to another field). Then compare the PrevEmp field to the Employee Name/ID# field in the current record. If it is the same add the previous total to the current amount. If it is different, just add the current amount. For Android and maybe other platforms, the conditional type doesn't allow pulling from previous records or adding fields so another field would have to be set up to add the previous total and Current amounts; this field would be used in the conditional if the two fields compared were the same. Only one view would be required for this method.
shalom
 
Posts: 34
Joined: Mon Sep 29, 2014 9:42 pm


Return to HanDBase for iPad

Who is online

Users browsing this forum: Bing [Bot] and 2 guests