Avatar

Log Records 5.6 vs 5.7

2

In 5.6 you were able to view logs by device or driver (GetLatestLogs with devicesFilter or driversFilter).  In 5.7 the Get method with entity type LogRecord uses a DeviceSearch object to return a Log Record (You can filter by device only).  How would I retrieve all specific driver logs over a time period regardless of what device he was assigned to/ or driving?

If a company is using the HOS Garmin solution for logging in drivers and they don't use a driver key like a NFC key, will the associated log data for the device also include the driver?  I know you can view exceptions by driver with this HOS Garmin solution.

Thank you,

Michael

Michael Head

Please sign in to leave a comment.

2 comments

0
Avatar

Hello, 

- for the exception events there is ExceptionEventSearch class that includes UserSearch property (drivers are users in 5.7)

- For all other data, the driver (user) is defined by the user's Trip. When the devices' tracking data falls into the date range of a particular trip, the user/driver associated with that trip is the user/driver for the tracking data as well. Therefore, the approach would be to retrieve the trip(s) for the driver by setting TripSearch.UserSearch, then to use the trips' date ranges with the device to retrieve the logs. The Trip object itself will contain the last coordinate for the trip, so getting the latest trip should suffice /replace getting of the last log in 5.6 

 

Thanks,

Serge.

Serge Pavlov 0 votes
0
Avatar

Thank you. 

That is exactly the approach I was looking at.  It just seemed that it was a lot of querying to get what you wanted.  For instance if I want to know where a user/driver was at any point in time it would involve the following (assuming a driver could be in any company vehicle): Run query to get user with some search parameter so I can get the user id.  Then run a trip query to get trips with a user search parameter with the dates filtered for the search.  Get the device id from the trip logs.  Then run a query for log records to get the exact log I am looking for that tells me exactly where the user was closest to my point in time I need.

LOL. 

Serge, I would like to speak to you outside of this forum for a specific question.

Michael Head 0 votes