Forum Discussion

EssenceQB_Admin's avatar
EssenceQB_Admin
Qrew Member
5 years ago

How to prevent double login in time sheet app

I have an app that our users can log times for specific tasks. I have a button on the dashboard that allows users to add a new time record and it returns them to the dashboard once complete.

However, I do not want them to access a new time record if they currently have a time record where they have not previously logged out. I am pretty sure I cannot do this in the current format because I cannot make a formula URL on the dashboard.

How can I insert a check of all of the current records to ensure the user is logged out before I take them to the new time entry page? I need an idea of how this may be accomplished as I am at a stand still to add this functionality in my app.

Thanks,

------------------------------
Ray Moss
Essence QB Admin
Essence Cabinets Inc.
Edmonton, AB, CAN
------------------------------
  • Can you tell us if you have a table of staff where the Key field is the userid?  It would help to know that in order to offer what might be an easy solution.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • EssenceQB_Admin's avatar
      EssenceQB_Admin
      Qrew Member
      I have only 2 tables. A Time Card table which logs the record owner as the user, and a tasks table for selection by the user. I do not have any additional tables.

      I was thinking of creating a new table where the key field is the users and is linked to the Time Card table. Then by adding a summary field to check if the logout is complete I can see if the user is completely logged out.

      But I do not know where to place the login button so it can be a formula URL for the users to click. Right now, I am using a button on a widget on the dashboard, but this does not allow formula URLs.

      ------------------------------
      Ray Moss
      Essence QB Admin
      Essence Cabinets Inc.
      Edmonton, AB, CAN
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        , You are definitely on the right track with the advantage of having a table of users where the key field is the user. Then you can summarize up the number of incomplete time cards and use that in a look up back down to the time card table.
        Note that you can have a relationship back to the Time Cards table where the reference field on the right side is the [Current User] with a formula of

        User()

        which returns the current user who's hands are on the keyboard.

        So it is true that a dashboard widget cannot use formula URLs, You can have a report of users filtered where the user ID is equal to the current user, so there will only be one record on that report. You can make a button on that report and then put that one record report with a button or two on your dashboard. So it will sort of look like a widget but in fact it will just be a short narrow report.  If you jam some other stuff beside it then it will be squeezed down to not more than 1/3 of the width of the screen and look widgety.   



        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------