5 Replies Latest reply on Jul 31, 2013 12:18 PM by philmodjunk

    Login Button Script



      Login Button Script


           Okay, I am making a script that takes the username from a drop down menu and can tell wether they have already punched in or punched out for that day and directs them to another layout according to that true or false statement. How do I make it so it knows if they have done that already? Feel free to ask me questions because I feel as I might not have explained my senario well enough.

        • 1. Re: Login Button Script

               I suggest that you use the AccountName--specified in Manage Security and not the UserName--specified in Edit Preferences.

               A find script or a relationship could be used to check for that Log in/out record.

               Relationship example:


               YourLayoutTable::cAccountName = TimeCards::AccountName AND
               YourLayoutTable::cToday = TimeCards::Date

               cAccount Name would be defined as an unstored calculation field with Get ( AccountName ).
               cToday would be an unstored calculation with: Get ( CurrentDate )

               If [ Not IsEmpty ( TimeCards::TimeIn ) ]

               would then detect that the user has not logged in today.

               If [ Not IsEmpty ( TimeCards::TimeOut ) ]

               would detect that the user has not logged out today

          • 2. Re: Login Button Script

                 Would there be a way that I could also make them take a picture of themselves during this? 


            • 3. Re: Login Button Script

                   Using what hardware to take the picture?

              • 4. Re: Login Button Script

                     It would be an iPad 

                • 5. Re: Login Button Script

                       Which means that you are using FM GO. Fortunately, none of what I have posted thus far is different for FM GO, but please indicate what systems will be using your database so that we can avoid giving you bad advice in the future.

                       Using the iPad's internal camera, it would be possible, but FM GO cannot fully automate the process. You can take the user to a layout and display instructions that hey need to tap the container field on the layout and then select the camera option to take and enter their picture into the container field, but these steps cannot be automated.