8 Replies Latest reply on Mar 15, 2012 2:05 AM by RubenVanDenBoogaard

    Testing for Idleness or Inactivity in FMP 11 (...not Server)

    johnhorner

      does anyone have a simple and elegant (or not so simple and elegant) way to test for whether a session is idle for some predetermined (e.g. globally defined or hard-coded) amount of time? i am trying to implement a routine where after 5 minutes, for example, the current user will be logged off and a default "login" user (with minimal privileges) will be logged in. this will leave the file constrained to a "login" layout and not allow any other activity other than logging in (based on the "login" privilege set). any thoughts much appreciated. thanks.

       

      john h.

        • 1. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
          techt

          Sounds like a script with timer should do what you're asking. Why bother logging in the other user? Sounds like you just want them out and they have to log back in. I'd just boot them out and let them log back in when they're ready, or am I missing something here?

           

          Tim

          • 2. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
            johnhorner

            hey tim,

             

            thanks for your post.  a script or timer sounds good... but how do you actually evaluate whether or not the user has been idle?  i don't want to log them out every 5 minutes regardless of what they are doing as they might be in the middle of something.  how would you test for this?  i could reset the timer with an "onlayoutkeystroke" trigger but i would have to put that on every single layout and that would not trap for things like the user clicking on buttons to navigate or print, for example.  i could additionally edit every single script and button but i am thinking (...hoping really) that there is an easier way.  i was also thinking i could check record modification timestamps but i think that will probably take a long time to go through all the records in every table and that still leaves the problem of not testing for the user just browsing without making changes.

             

            the solution is for invoicing used in a retail sales environment.  there are multiple sales people, as well as a manger with higher privileges.  they can intentionally change users on the fly with a "change user" script but there are a number of scenarios that make this a less than complete solution:

             

            1. people get lazy and ring sales on someone else's account (it is not a commission based environment so there is no incentive for the individual salesperson to make sure they are ringing under their own account... but the owner wants to track this info accurately)

            2. if the manager is logged in and walks away forgetting to log out, then the sales people have access to information they are not allowed to see (e.g. other employee's salaries, timesheets, or social security information, etc) as well as increased access to other records and actions (overrides, delete records, etc)

            3. a customer would have access to the data

             

            the reason i would prefer for there to always be a login, is that is somewhat easier to simply log back in than to have to navigate to the file and re-open it and re-login.  perhaps doing this once is not such a hassle, but to do this 20 times a day i think is a big nuisance for the users... but maybe that's just what it will have to be...?

            • 3. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
              techt

              No worries. Are these Macs or Windows machines?

               

              TT

              • 4. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
                johnhorner

                it will be on macs... with a strong desire on the owner's part to deploy it to ipads at some point... i'm not sure what other challenges that will introduce!?

                • 5. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
                  techt

                  Ok John, here's a couple of thoughts.

                   

                  I don't think a script timer will work. If sales people come to the Mac and someone hasn't logged out yet, either by action or timer, the next sales person can still use the former's account. This is a break in process that really can't be fixed with the timer. My recommendation in these instances is to post a report showing activity. If everyone knows they are being tracked as to sales and activity, they'll become more attuned to making sure they properly record their sales. Even if they aren't on commission, knowing that metrics are being tracked is usually enough motivation, especially where reviews and rewards could be at stake.

                   

                  How many layouts are you talking about? Maybe reworking the layout structure such that at the completion of the sale, the user is always returned to a primary layout, which would have a timer on it, such that if a field is still empty after five minutes (customer name, phone number, first item, etc. - pick something that always gets filled in), then the timer script returns the user to the login layout. Again, this won't stop someone logging a sale under another account if they get their before the timer fires.

                   

                  Having a primary field filled in would stop the timer and if the sale took thirty minutes, they'd still be active.

                   

                  If they're on iPads at some point, maybe one for each will make this easier, since everyone would have their own.

                   

                  Why would a sales person browse records beyond five minutes? This is somewhat rhetorical. But if there is another screen that they use, maybe just a timer there to return them to login after five minutes as well, or after they complete a search. This is more process-oriented I'm sure, but I'm just trying to get a better idea of what's going on and why. A manager logging in on a computer where everyone can see sensitive information sounds like a bad idea. Maybe a second account would be better - one that they could use on the sales floor with no greater privileges that anyone else, and their manager account for the office.

                   

                  Is this a hosted solution? If not, why not get it on a server (better performance and backups) and then use the server to detect idle.

                   

                  HTH,


                  Tim

                  1 of 1 people found this helpful
                  • 6. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
                    johnhorner

                    hey tim,

                     

                    thanks... those are some really helpful suggestions!  i like the idea of a primary or "home" layout where the user will be placed after the sale is finished (currenty they are just left on the last invoice... not a great idea anyway).  i think rather than have any fields on that layout it would be more of a "holding" station with buttons to start a new invoice, find a client record, etc.  i can then start a timer there and use an onlayout exit to stop the timer.  that closes some gaps and is much easier than triggering every layout (i don't know how many layouts there are exactly, but it is certainly over 100... that would have been a drag!).  i suppose it still leaves it vulnerable to the user starting an invoice and not completing the whatever process will designate the sale as completed (whether it is the receipt of payment, or the user manually clicking on a "completed" checkbox or something else).  i suppose in addition to the "primary" or "home" layout,  i could  trigger just the most frequently used layouts and that would trap another 90% of possible scenarious.

                     

                    it also hadn't occurred to me to give the manager a second account.  i like that idea.  i will have to change some things because currenty, user account names are constrained to be the actual name of the employee and my understanding is that you can't create 2 accounts with the same name... but that should not be too difficult to tweak.

                     

                    your suggestions also made me think that since this solution is built around the data separation model, i could make a new user interface for sales that would be a significantly stripped down version of the current user interface which contains many things not required for the sales environment... hmmmm?  i think i'll start with your other suggestions first.  thanks again.  that is very helpful!

                     

                    john h.

                    • 7. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
                      techt

                      Glad to help John, and good to hear that it might makes some things easier for you and your client. Maybe a timer on the invoice page based on the payment or payment received. Set that to the typical time to process, maybe 15 minutes, and the payment field isn't filled, prompt the user to continue or drop the invoice and go back "home."

                       

                      There have been a few instances where I've needed to create a JohnAdmin account for example, that the managers then wouldn't confuse which account they were using. With shared computers/devices, I found that a second account is easiest way to make sure eyes can't wander where they shouldn't.

                       

                      Good luck and have fun!

                       

                      Tim

                      • 8. Re: Testing for Idleness or Inactivity in FMP 11 (...not Server)
                        RubenVanDenBoogaard

                        Hi John,

                         

                        I use the ZippScript plugin for this, this plugin has a function to trigger a script after a specific idle time.

                        Unfortunately ZippScript is not freely distributed anymore, but there may be other plugin's with this

                        function. (otherwise send me a PM and I'll send you a copy)

                         

                        Best regards,

                         

                        Ruben van den Boogaard

                        Infomatics Software

                        ruben@infomatics.nl