3 Replies Latest reply on Jun 25, 2017 5:38 PM by philmodjunk

    Calculating Time Between Related Multiple Log File Events

    garyjones

      Hi,

       

      Following Kevin Franks' article on Magic Key, https://filemakerhacks.com/2011/07/31/magic-key-and-check-box-reporting/ , I have managed to create relationship functionality that records the time and date at which a window which contains an audio file player is opened and closed and other events between these two actions, such as liking a song.

       

      See table schema below.

      LogFileRelationship.PNG

       

      What I would like to achieve is some way of calculating the difference in time between two events - such as opening and closing the audio player window and possibly expand that to include the timings for an event between these two actions relevant to an __pk/fkAudioID.

       

      Below is an example table of data taken from the Playback History Event table.

       

      LogFilePlaybackHistory.PNG

       

      For some reason I can't seem to get my head around this - i have tried all sorts of scenarios today with relationships etc. What's confusing me is the fact that a user my open and play the audio player for the same track on a number of occasions, with additional events in between, and how to differentiate each __pkPHID relative to the _fkAudioID - so that I can say User X opened audio Y on Z date and played the track for Z minutes (the difference between opening and closing the player window AND/OR during this time they liked/disliked the track).

       

      I have clearly have a lot to learn but all help appreciated as always.

       

      Best

       

      Gary