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

Identify skipped dates in a set of records

Featured Replies

Good Morning,

 

In the trucking business, drivers are required to record their entire day on what is known as a "Driver's Daily Log". A driver has many logs, there is one log for every date. Drivers should have one log handed in for every day of the year. One of the problems I have is ensuring that everyone hands in a log for every day. 

 

I need a script that can identify for each driver the logs that have not been handed in and alert the user. 

Hi Mandy,

 

The easy answer, don't pay them for those days they have failed to comply. Ok, real world.

 

How do you know when they have't turned one in, is there a date field or something is empty?

 

When you say everyday, do you mean work days or 365/366?

Edited by Lee Smith
added to the question

The easy answer, don't pay them for those days they have failed to comply.

 

Lee – that is exactly WHY she wants those dates in the first place …  :laugh:

 

Mandy –

 

here's one way to do it, using a relationship, filtered portals (with helpful visual feedback) and scripts. You could also loop through the records in the Log table directly (after doing a Find on the filter year, presumably). Note that you need to integrate any business rules (like Lee said: every day of the year?; workdays only? etc.) when you create the list.

 

You also must decide where you write the missing dates – one ever growing field in Drivers, or another child table? One idea would be to use the child table you already have – add records for the missing dates to the Log table and mark them as "submitted”. This would work in reverse of the other scripts: take a list of missing dates for a driver and loop through it to create new, ”unsubmitted“ Log records for the driver.

FindGaps_eos.fp7.zip

Lee – that is exactly WHY she wants those dates in the first place 

And that is why I asked what was in placed now, if anything, as far as how they would know.

  • Author

Drivers need to hand in a log for everyday of the year, 365 days that is, but I only ever need this particular data for the previous six months. This database isn't used for payroll purposes in any case, just to check and ensure compliance with Federal Legislation among other things. I need to be able to find which logs are missing by the records not existing in the database. 

 

Thanks for the help, eos. I'll play around with this and see if I can integrate it in. 

  • 3 weeks later...
  • Author

Works like a dream. Thanks for the help :)

Create an account or sign in to comment

Important Information

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

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.