Forum Discussion

RShehan's avatar
RShehan
Copper Contributor
Jun 24, 2024

Creating a form and/or power app timesheet

I have a design question, more so than coding:

I am trying to think of a way to create a timesheet in SharePoint lists that runs concurrently with someone in the field, while they are working, to capture their work hours with the following aspects: (I think these are essentially list column headers?)

  • Yes/no buttons for various things
  • Start time as a "driving time" button (not as a time input) that generates a timestamp based on local time zone.
  • A "non-driving time" start and stop button + time stamp for both
  • A "non-work time" start and stop button + time stamp for both
  • A "finish shift" button that ends that row
  • A "new shift" button that starts a new row using the persons name (or their login)

I have started to build some lists which do kind of work, but I am not sure how to get the time stamp and new rows to generate?

  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    RShehan yes you would want a series of date/time columns to record each timestamp. But to make it easier for the worker to complete I would build a mobile app in Power Apps that saves the press of each button into the SharePoint list and in the app there would be a gallery showing all the worker's timesheets (or timesheets not yet marked as complete). The OnSelect property of each button would use the Now() function which records the current date & time in the user's local timezone.

     

    There are quite a few videos on YouTube around creating Power Apps timesheet apps. There's also a series of blog posts by Matthew Devaney at https://www.matthewdevaney.com/make-a-power-apps-timesheets-app-part-1/

     

    Or come back here if you have specific questions or would like a quick & dirty mockup of how it would work.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

     

     

    • RShehan's avatar
      RShehan
      Copper Contributor

      Rob_Elliott I have this as my current header, which I don't believe will work, but need to start somewhere:

      Hoping for each shift to complete a new row under the headings, with multiple start and stop times within each shift. The list entry won't be directly visible to the end user, only the app or form. I am thinking some kind of power BI output for the end user view.

       

      Would each login be an individual list?

       

      There will be thousands of these entries per year (hundreds per user and 50+ users), all of which will be retained as a permanent record of the times. Currently this is done on paper, which is an admin nightmare.

       

      I imagine this will take some considerable time to design and test, if it actually works in the long run.

       

      The idea is to use the existing power of SharePoint/lists/built in functions to capture this data, which essentially ends up in a database like this anyway, so it can be monitored 24/7 online, and be audited in the future.

       

      Is there some kind of offline capability with SharePoint on a local device? The end users are mostly using a mobile device/cell phone.

       

      If I explained the process flow from the users perspective, would that assist with the design?

      • Rob_Elliott's avatar
        Rob_Elliott
        Bronze Contributor

        RShehan through list permissions you could allow the end user to see only the entries they created and not the others.

         

        "I am thinking some kind of power BI output for the end user view." No, I recommend you use Power Apps for the front end with the SharePoint list as the backend.

         

        "Would each login be an individual list?" No, but each user would save the data to a new item in the list.

         

        "Is there some kind of offline capability with SharePoint on a local device? The end users are mostly using a mobile device/cell phone." No, but there is with Power Apps, so if a user loses connection it would save the data to the local device and upload it when the connection is restored.

         

        It shouldn't take too long to build if you have someone in your organisation who know Power Apps. If not there is naturally a learning curve, but as I said in my previous post there are many Power Apps  timesheet how-to videos on YouTube. But I can build a quick app for you that will demonstrate what I'v been talking about.

         

        Rob
        Los Gallardos
        Microsoft Power Automate Community Super User.
        Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources