12 Replies Latest reply on Feb 15, 2016 12:25 PM by ienalpe28

    How to count every person registered?

    ienalpe28

      Hi guys I'm new to filemaker and I am creating a simple database for every person who time in and then count the person position.

       

      Example: I am the first to arrive at the office and I time in at 7:00 am, this should make me "1" meaning I am the first to arrive. and then another employee arrive at 7:05 which automatically place him "2" for arriving second and so on and so forth. When I time in the place or position automatically generates. How can I achieved this?

       

      I'm building this for the attendance the whole year. We will have a special prizes to the top 10 winners. Thanks in advance.

        • 1. Re: How to count every person registered?
          peterba1

          Re-start counting each day?

          • 2. Re: How to count every person registered?
            peterba1

            Create a table with a field that registers each login to the database using a calculation.  The second field in the table should be a timestamp, You can then find the current day, sort the timestamps and allocate a number using replacing.  This could run each time anyone logs in.

             

            I had a database that did this in the past, but cannot find it.

            • 3. Re: How to count every person registered?
              Urs_Landis

              or you just count the logins with a self relationsship on the date

              • 4. Re: How to count every person registered?
                ienalpe28

                uhmmmm... let me absorb that a sec. hmmmmmmmm not getting it haha.. So far I got the timestamp which is triggered by a button. So when I click the button it registered the time and it should get the place or positiong also whether 1, 2, 3 or so on..

                • 5. Re: How to count every person registered?
                  peterba1

                  I called my database Log test Database

                  You need some fields:

                  Name -text

                  Timestamp - creation timestamp

                  Login - Calculation -

                   

                  Order of arrival - Number

                   

                  Then use the following script and set the file options to a script trigger onFirstWindow Open

                   

                  Script: OPS on open

                  • Go to Layout [ “Log test Database” ]
                  • New Record/Request
                  • Set Field [ Log test Database::Name; Get ( UserName ) ]
                  • Set Variable [ $Count; Value:0 ]
                  • Go to Record/Request/Page [ First ]
                  • Loop
                  • Set Variable [ $Count; Value:Log test Database::Login +$Count ]
                  • Go to Record/Request/Page [ Next; Exit after last ]
                  • End Loop
                  • Set Field [ Log test Database::Order of arrival; $Count ]

                   

                  Only fields created today get counted.  The first person arriving always gets counted as 1.

                  • 6. Re: How to count every person registered?
                    peterba1

                    I forgot.  You should use the Get(accountName) not user name in the script.  It was just easier to set up with userName.

                    • 7. Re: How to count every person registered?
                      Urs_Landis

                      or insted of the loop make a self relationship Date = Date and Count(Date)

                      • 8. Re: How to count every person registered?

                        I would also consider award for those who can be productive without having to burn fossil fuels and wasting productive time sitting in traffic to get to a "management by attendance" office job.

                         

                        - m

                        • 9. Re: How to count every person registered?

                          Part of my reply above got cut off, sorry.

                           

                          As I understand your posting, this is a super simple and quick thing to create. The only challenge might be making it look nice or some functionality like letting a user "undo" a check-in if they pick the wrong employee by mistake, etc.

                           

                          To do this, I would create two tables: Employee and Attendance.

                           

                          Then create a 1:M relationship between them, but you don't have to worry about setting cardinality, FileMaker takes care of that step for you (which is great!) when you drag the field from Employee to Attendance in the Relationship graph.

                           

                          I wrote something similar to this for a friend's meeting check-in and it runs on an iPad where this kind of app works really well.

                           

                          What I did was to create a bunch of big buttons that when the meeting attendee clicked his button, it simply writes a TimeStamp value into the (in your case, possibly) Attendance table.  Once you have all this data, you can slice/dice it any way you want.  It's nice if you can use a touch screen for "check-in" apps like this, but opinions or your requirements could vary.

                           

                          Maybe you need an "undo" feature in case an employee checks in the wrong person or, but hopefully not, also include a multi-digit PIN or something that an employee knows so one employee can't check in another employee.

                           

                          FileMaker makes all this easy to do once you have all the requirements.

                           

                          HTH

                          • 10. Re: How to count every person registered?
                            siplus

                            IMHO everybody should default to 999 for the day, otherwise people that don't come at all will get an empty and will rank better than the ones with rank 1. And coming later but staying longer in the office should also count.

                             

                            Anyway, time is internally an integer value, so at the end of the year you GetAsNumber(timeofarrival), sum it across the year per employee, sort the employees on the sum and you have your ranking.

                            • 11. Re: How to count every person registered?

                              Interesting, but ranking doesn't equal productivity, or, as I see it, really much of anything useful other than an arbitrary measure.

                               

                              Time at your desk = Quality of "something"???

                               

                              This is one of those examples, IMHO, where the underlying assumption of what's being measured or even done be given a serious reality check, not just jumping in and figuring out how to code it. (Hurray, I'm coding!!!).

                               

                              But, OK's that's the OP's requiement.

                               

                              --

                               

                              Why don't we just cut to the chase and suggest that every employee have an in-office tracking device surgically implanted so you could also track bathroom breaks, lunch, and any other activity that would keep the employee from being chained to their desks (being 100% productive at all those desk-chained moments, of course).

                               

                              (Kidding of course, but the data would be just as "useful" as in not very.)

                               

                               

                               

                              - m

                              • 12. Re: How to count every person registered?
                                ienalpe28

                                Thank you all for your comments and suggestions. peterba1 thanks for giving me the Log test database sample. It did the count but not exactly how I wanted to. Let me give you guys a much clearer example. A race where runners cross the finish line records his time and his place/position at the same time and will display the details.

                                 

                                Name          Time          Arrival Order

                                Mel              7:00:19              1

                                Sarah           7:00:50              2

                                Andy            7:35:14              4

                                Gerald          7:20:20              3

                                 

                                I guess we will use RFID chip which will be in the Employee ID and once they tap it to the reader the details will be recorded.

                                 

                                disabled_morkus and siplus This will only record the ranking of attendance. There is also a separate committee that will handle the productivity of the employee and it will also have awards and prizes Thanks you all.