1 Reply Latest reply on May 8, 2011 8:18 AM by LaRetta_1

    Auto Sign Out



      Auto Sign Out



      I have created a sign in system where users login and logout when they are at headquarters.

      I have noticed however, that some members forget to sign out, which can cause problems later and the 'hours at headquarters' may be way higher than what was actually achieved.

      Is there a way so that all members are signed out at a certain time (eg 2am) or preferrably, after a period of 24 hours from whenever they signed in. I'm not really sure how to set a timer, so that users will be automatically signed out after a period of time.

      I have fields for time signed in, and time signed out.

      Thanks for your help,


        • 1. Re: Auto Sign Out

          If the purpose of the table is to find out how many hours a User has been at headquarters then signing them out automatically defeats the purpose.  The answer is to train the Users to take care of their business.  It is no different than Users who punch time clocks.  If they forget to punch out, they pay the consequences.  And what if a User had an emergency project and actually WAS at the office over that period of time?  You will disconnect them prematurely.

          Nonetheless, the answer would be determined by how your solution is structured and we have none of that information but here is a basic approach:

          Let's say you determine that, if someone isn't signed out after 24 hours then you sign them out.  The first thing I would do is create another field (type number) named AutoDisconnect.  In this way, if system signs them out you will at least have a record of it and can discuss the issue that they do their job and it also protects the company/developer.

          Also, your login and logout fields should truly be timestamp because then it all becomes easy.  I will explain timestamp.  If your fields are not, you can convert them and I would walk you through it.  If you simply can NOT change the fields then I can provide alternate calculation.

          So you need to create a calculation in your table call OverDue with:

          Case (  login and not logout ;
          login + 86400 > Get ( CurrentTimeStamp )

          Result is number and in Storage options, check 'do not store ...'.  It will produce a 0 if they have not logged out within 24 hours.  You then can display or find the 0 whenever you wish.  To auto log someone out, you will need to use script.  Once you find the 0 records, script might be:

          Set Field [ AutoDisconnect ; 1 ]
          Set Field [ logout ; Get ( CurrentTimeStamp ) ]

          System cannot monitor and fire this script on an individual record throughout the day so it always happens exactly 24 hours after the fact.  Well, you could ... but it would require a robot running all the time or other hokey methods to make it work well.  You could run this once a night or even twice a day or something if you wished.