Discussions

 View Only
  • 1.  How to prevent double login in time sheet app

    Posted 11-13-2020 11:29
    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
    ------------------------------


  • 2.  RE: How to prevent double login in time sheet app

    Posted 11-13-2020 11:33
    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
    ------------------------------



  • 3.  RE: How to prevent double login in time sheet app

    Posted 11-13-2020 12:03
    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
    ------------------------------



  • 4.  RE: How to prevent double login in time sheet app

    Posted 11-13-2020 12:09
    , 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
    ------------------------------



  • 5.  RE: How to prevent double login in time sheet app

    Posted 11-13-2020 12:26
    That sounds promising. I will give that a try. Thanks for your help and the rapid response.

    ------------------------------
    Ray Moss
    Essence QB Admin
    Essence Cabinets Inc.
    Edmonton, AB, CAN
    ------------------------------



  • 6.  RE: How to prevent double login in time sheet app

    Posted 12-09-2020 11:51
    Just a quick follow up. I created a formula field in the Time Card table that evaluated to 1 if there was no login, and defaulted to 0. Then I made a user table that summarized the totals in the formula field. That meant if the total in the summary field was > 1, there was 1 (or many) logout(s) required. I added the summary field as a reference field back into the Time Clock table and created an If statement in an URL field with a java script popup message in case the value was >1.

    Works like a charm. Just hard for me to visualize at first.

    Thanks,

    ------------------------------
    Ray Moss
    Essence QB Admin
    Essence Cabinets Inc.
    Edmonton, AB, CAN
    ------------------------------