3 Replies Latest reply on Sep 21, 2012 11:14 PM by tomo17

    Can it be done - calculating players game time??

    tomo17

      Title

      Can it be done - calculating players game time??

      Post

      A friend has seen some of the things i have been doing with filemaker and has asked me about the following setup. to be honest it looked way over my head but intrigued me.  i am trying to get my head around whether it can be done or not.  any suggestions greatly appreciated.

       

      Basically a calculator for individuals time on court during a quarter/game using timestamps. i am thinking that this can be done by creating a new record in a table for each player as they step on the court.  The time on court is calculated using a calculation field and then using summary fields i can get a running total for the game or quarter.  these are my questions:

      - can i have the team list of players on a layout and have "on" "off" buttons next to each player to create a timestamp as they step on/off the court.

      - is it possible for me to have on the same layout next to each player a field showing their total time on court?

      - is there an alternative to creating a new record each time a player enters the game?

      - can i have a trigger button to start/finish each playing period so that i can get a qtr by qtr breakdown?

       

      Hope this makes sense

       

      Thanks

      Craig

        • 1. Re: Can it be done - calculating players game time??
          philmodjunk

          - can i have the team list of players on a layout and have "on" "off" buttons next to each player to create a timestamp as they step on/off the court.

          Yes, look into using portals as well as list view layouts as either could be used for this. Your buttons can simply update time stamp fields and create records as needed to log playing time.

          - is it possible for me to have on the same layout next to each player a field showing their total time on court?

          Yes, and there is more than one option for this. You can use a summary field or a calculation field that uses a relationship and the sum function to compute total playing time. The details one how to set this up will depend on your table and relationship design.

          - is there an alternative to creating a new record each time a player enters the game?

          Yes, but I think logging each court entrance with a new record records more useful data than just updating the same record over and over again. (I'd create a new record when they enter the court and log a time stamp in an "exit" field when they leave the court.) With a record for every time they enter the game, you can not only compute the total playing time, but also how many times they entered the game--a detail the coach might find useful.

          - can i have a trigger button to start/finish each playing period so that i can get a qtr by qtr breakdown?

          That's just another script where you click one button and log every active player's exit of the court in one script. A similar script can allow you to set up the starting or current line up in advance and then log them all in with a single click and with indentical time stamps.

          • 2. Re: Can it be done - calculating players game time??
            tomo17

            coming back to this after earlier putting it in the too hard basket.  i have attached a image of the database as it now sits.   the database would be catering for a squad of 45 players of which only some play each game. information regarding matches is already pre entered(opposition, date ground of match).  user just selects the game to be used.  the key information needed by the user is the game time per quarter and overall game time.

            my workflow would be something like this:

            Pre-match Select players (20 matches played x 22 players used per match):

                  Goto layout based on match information

                  Have a portal that the list of players and then use a radio button to select who is playing

                  This then creates a record in the match selection table that shows match info and players selected ie rnd 1 jones selected, rnd 1 smith not selected

            In Match interchange records

                  goto layout based on match information with a portal that has the selected players listed using a filter.

                  have a button that scripts for a new record with timestamp whenever a player enters the game (match records::on)

                  have a second button that enters timestamp for player exit in same record that was created (match records::off)

                  summary and calculation fields generate the time played per quarter/match

             

            My problems at this point are:

                i cant get a complete list of the players to show up on the portal in the match selection layout 

                i have tried on a dummy sheet but the create new record script creates a record with the wrong player id

                i am not sure if it is the way that i have linked the tables that is the problem

             

            i hope this makes sense - any help greatly appreciated

            Many thanks

            Craig

            • 3. Re: Can it be done - calculating players game time??
              tomo17

                   Back to working on this and whilst it is pretty much as what i had earlier there have been a few tweaks as part of a bigger project.

                   Currently i have two problems that i cant seem to solve.  

                       1.The summary fields a) arent updating and b) are the same for all of the players.

                       2.  Players will come on and off in a random order.  Currently I have a layout that has a portal with all the players on and have a scripted button to enter time on and off data.  When i press the off button for any player it will only update the last created entry rather than the one that relates to that particular player.  I have tried having it go to a related record but i am obviously not setting this up right.

                    

                   Any help on these two issues would be greatly appreciated\

                   Thanks