Jump to content
Server Maintenance This Week. ×

Summarize 2 data points for time display?


This topic is 2489 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a time table and every time an employee logs into filemaker a record is created, the field Time In is set to get current time, date is set to get current date, account name is set, the record is given a record number and an $$variable record number is created. When the user exits filemaker a script is run: to to time layout, enter find mode, set field $$variable, find record, set Time Out field as Get Current time.

This creates the time in and time out record overtime an employee uses our system and I have a time field that calculated time out - time in = time elapsed.

Every day an employee will typically have 2 records, morning time in, time out for lunch. A new record when back from lunch and time out for the day.

How can I create a calculation that finds both of these records for each account name and adds the time elapsed together so I can create a layout saying Monday Account #1 worked a total of 8 hours, Tuesday 7.5 hours, etc etc.

Link to comment
Share on other sites

I have attached a sample of Comment's suggestion, although it will be good for you to read up on the reporting capabilities of FM anyway.  In the attached file, there are three reports.  The first report would be good to give to the Employee which lists the detail.  I included a page break between Employee (see part setup) so you can print them for handouts.  The second report is just a duplicate of the first with the body deleted.  It shows, per day, the totals.  It is handy for a bookkeeper generating payroll.  The third report is again identical report but with the 'date' leading part deleted.  It shows only the accumulated totals per Employee.

A summary report must be sorted according to its break fields (which are simply the summary parts).  When you create a new 'report' layout, these summary parts are known as 'grouped by'.  You will, of course, also have to perform a search for the dates within that payroll period first.  When new to reporting, it is best to let FileMaker create the script for you (during your report creation) and then modify it as needed, by adding the search to the beginning.

I hope this gives you a quick-start to reporting. :)

EmployeeTime.fmp12

I should also add that I was quite lazy.  The sort for the second and third reports do NOT need to include sorting the time (in the second report) nor sorting the date/time) in the third report.  I also cheated and used script parameter instead of creating three separate scripts and the reports aren't pretty ... I was short on time (pun intended).

Link to comment
Share on other sites

This topic is 2489 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.