Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Summarize 2 data points for time display?

Featured Replies

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.

If this is for a report, could you not simply sort the records by employee and by date? A summary field placed in a sub-summary by date part will do the total for you.

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).

I wanted to also mention that we can use a single report and omit the body or show it, according to the sort.  I have attached that file adjustment.  

EmployeeTimeDynamicBody.fmp12

You can use a global variable and choose to hide the fields on the second and third reports.  

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.