cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Creating Time Sheet form on Power Apps

I am trying to customise a time sheet form on power apps using the fields from my SharePoint list. Is it possible to create a form where an employee can clock in once but can later come back in to add in several activities they've performed within the day without having to clock in again. Also would it mean creating more than one form for one list?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Creating Time Sheet form on Power Apps

Here is a small example of the structure I'm talking about.

2020-02-17 08_23_14-Untitled Diagram.drawio - draw.io.png

On your App's OnStart function, you can generate a sessionID using Today() to get the date which they are clocking in/out and doing their activities. I've used GUID() in the past, but I think Today() will make more sense here.

You can do a LookUp(Timeclock, And(SessionID = Today(),Action="In"),Action) to see if they have already clocked in today. If so, disable a clock in button and enable a clock out button. If they have not, do the opposite.

To enter activities, just use Collect() to insert a new row into the Activity List using the Today() sessionID, give an activity name and note (this can be used for production tracking, breaks, overtime, etc..).

Similarly, you will use Collect() to add a clock in/out.

Clock In
Collect(Timeclock,{SessionID:Today(),EmployeeName:Office365Users.MyProfileV2().displayName,EmployeeEmail:User().Email,Timestamp:Now(),Action:"In"})

Clock Out
Collect(Timeclock,{SessionID:Today(),EmployeeName:Office365Users.MyProfileV2().displayName,EmployeeEmail:User().Email,Timestamp:Now(),Action:"Out"})

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

 

View solution in original post

10 REPLIES 10
Highlighted
Super User
Super User

Re: Creating Time Sheet form on Power Apps

Yes, this is possible. You would have one list of time clock ins/outs that they can clock in to, then a list of activities that they can write to. You would need a clock in/out screen and a screen for adding entries to the other list.

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

Highlighted
Super User III
Super User III

Re: Creating Time Sheet form on Power Apps

@SandraAkujobi
I’m sure it can be done. Whether or not you need multiple lists depends entirely on what the app does.

Can you please explain what data will be collected from the user at each step? Walk us through the process and show some sample data.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Post Partisan
Post Partisan

Re: Creating Time Sheet form on Power Apps

@mdevaney  basically the data collected by the user would be the time they clocked in and out, the activities they've done for the day, so the duration of each activities, a user can have multiple activities for the day. Another thing they would need to put in is their complete work hour for the day, break hour, travel time and overtime.  By the end of the every week data they've provided are collected into one and sent to their respective manager to be approved. 

The images below show the process of how it would look like once information have been collected from users.

 

so this is how it looks when grouped by employee and start timeso this is how it looks when grouped by employee and start timeSo when an individual is clicked on  it shows the activity they've put in for the daySo when an individual is clicked on it shows the activity they've put in for the daythese are the two activities done by this userthese are the two activities done by this user

 I've also created a timesheet entries list for when the week is completed their timesheet for the week could be stored and sent for approvals but when I tried to do that just one activity was added in excluding the other inputs for the day and the week. Which is why I'm asking whether I would need to create another list to be able to avoid that issue. 

 

Please let me know if you need anymore information.

 

Highlighted
Post Partisan
Post Partisan

Re: Creating Time Sheet form on Power Apps

@EricLottIf I create separate screens for the two how would they connect, would I have to create a lookup field on the activity list?

 

So a clock in/out screen that lets them clock in and then it would navigate then to the activity screen, but what if they want to add in another activity for the day that would mean they would have to sign in again?

 

Highlighted
Super User
Super User

Re: Creating Time Sheet form on Power Apps

Yes, you could just do a lookup field to gather the activities for each work period. Do you already have existing Lists set up, or are you starting from scratch?

Highlighted
Post Partisan
Post Partisan

Re: Creating Time Sheet form on Power Apps

I'm starting from scratch.

Highlighted
Super User
Super User

Re: Creating Time Sheet form on Power Apps

Here is a small example of the structure I'm talking about.

2020-02-17 08_23_14-Untitled Diagram.drawio - draw.io.png

On your App's OnStart function, you can generate a sessionID using Today() to get the date which they are clocking in/out and doing their activities. I've used GUID() in the past, but I think Today() will make more sense here.

You can do a LookUp(Timeclock, And(SessionID = Today(),Action="In"),Action) to see if they have already clocked in today. If so, disable a clock in button and enable a clock out button. If they have not, do the opposite.

To enter activities, just use Collect() to insert a new row into the Activity List using the Today() sessionID, give an activity name and note (this can be used for production tracking, breaks, overtime, etc..).

Similarly, you will use Collect() to add a clock in/out.

Clock In
Collect(Timeclock,{SessionID:Today(),EmployeeName:Office365Users.MyProfileV2().displayName,EmployeeEmail:User().Email,Timestamp:Now(),Action:"In"})

Clock Out
Collect(Timeclock,{SessionID:Today(),EmployeeName:Office365Users.MyProfileV2().displayName,EmployeeEmail:User().Email,Timestamp:Now(),Action:"Out"})

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

 

View solution in original post

Highlighted
Super User
Super User

Re: Creating Time Sheet form on Power Apps

Another thing, you may want to add a date picker control to override the SessionID with a different date if they need to add activities to previous dates. That would look something like this:

If(DatePicker1.SelectedDate <> SessionID,Set(SessionID,DatePicker1.SelectedDate));
//Do the Collect() to add the activity;
Set(SessionID,Today())

 

Highlighted
Post Partisan
Post Partisan

Re: Creating Time Sheet form on Power Apps

@EricLottI've been trying to follow the instructions given on Power Apps but it's quite difficult to follow. 

 

1. Are both timeclock app and activity app combined?

2. The formulas you've given what properties would they be included in?

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,105)