cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SandraAkujobi
Level: Powered On

Creating TimeSheet app with multiple lists

How can you combine two lists (Click in/out & Activity List) on power apps to create an app and make them work alongside each other. I'm trying to create a timesheet on SharePoint then create the app, also how can you collect an individuals multiple entries for the week into a single item that can be shared on SharePoint so that their manager can view and approve them all. Also how can configure the app that once an employee has clocked in for the day that they can't clock in again until they've clocked out just in case they might want to and in more activities for the day. 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Creating TimeSheet app with multiple lists

Hi @SandraAkujobi ,

Could you please share a bit more about your scenario?

Do you want to create a TimeSheet app within multiple SP Lists?

 

Based on the needs that you mentioned. I think the PowerApps could achieve your needs. If you want to create a TimeSheet app in your app based on SP Lists, please check the following video resource or thread:

https://www.youtube.com/watch?v=trd7g-Rphe8

https://powerusers.microsoft.com/t5/Building-Power-Apps/timesheet/td-p/263386

https://powerusers.microsoft.com/t5/Creating-Apps/Creating-a-Time-Tracking-Timesheet-PowerApp-using-...

 

For your second question, do you want to prevent the employee from clocking in again for the day? As an workaround, you could consider store the current sign in user's email into your SP List when he click the "Clock" button, you also need to create date time type column (include Time value) to store the date time the user clock in.

Within your app, you could consider add a "Clock In" button and a "Clock Out" button. Set the OnSelect property of the "Clock In" button to following:

Patch(
       'Click in/out List', 
       Defaults('Click in/out List'), 
       {
          Title: "Click in Request", 
          LogEmail: User().Email, 
          'Clock in Date': Now()
       }
)

Set the DisplayMode property of the "Clock In" button to following:

If(
   !IsBlank(LookUp('Click in/out List', LogEmail = User().Email && Text(Today(), "yyyymmdd") = Text('Clock in Date', "yyyymmdd"))),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

Set the OnSelect property of the "Clock Out" button to following:

Patch(
       'Click in/out List', 
       LookUp('Click in/out List', LogEmail = User().Email), 
       { 
          'Clock out Date': Now()
       }
)

Set the DisplayMode property of the "Clock Out" button to following:

If(
   !IsBlank(LookUp('Click in/out List', LogEmail = User().Email && Text(Today(), "yyyymmdd") = Text('Clock in Date', "yyyymmdd"), 'Clock out Date')),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SandraAkujobi
Level: Powered On

Re: Creating TimeSheet app with multiple lists

@v-xida-msftI'm not able to access this link.

https://powerusers.microsoft.com/t5/Creating-Apps/Creating-a-Time-Tracking-Timesheet-PowerApp-using-...

 

So I replaced the clock in/out date&time field with a clock in/out buttons and used the formulas you sent but it's still giving me an error.

I kind of changed the formulas to match with my fields;

 

Clock in button (OnSelect): 

 

Patch('Clock_In/Clock_Out', Defaults('Clock_In/Clock_Out'), {Title: "Clock In", LogEmail: User().Email, 'Clock in Date': Now()})

 

 

Clock in button (DisplayMode): 

 

If(!IsBlank(LookUp('Clock_In/Clock_Out', LogEmail = User().Email && Text(Today(), "[$-en-GB]ddmmyyyy") = Text('Clock in', "[$-en-GB]ddmmyyyy"))), DisplayMode.Disabled, DisplayMode.Edit)

 

 

Clock out button (OnSelect):

 

Patch('Clock_In/Clock_Out', LookUp('Clock_In/Clock_Out', LogEmail = User().Email), {'Clock out Date': Now()})

 

 

Clock out button (DisplayMode):

 

If(!IsBlank(LookUp('Clock_In/Clock_Out', LogEmail = User().Email && Text(Today(), "[$-en-GB]ddmmyyyy") = Text('Clock in Date', "[$-en-GB]ddmmyyyy"),'Clock out Date')),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

 

Screenshot (20).png

Community Support Team
Community Support Team

Re: Creating TimeSheet app with multiple lists

Hi @SandraAkujobi ,

Could you please share a bit more about the error message that you mentioned?

 

Based on the screenshot that you mentioned, I think you just faced a Delegation warning issue within your formula. The thing you need to know is that -- The Delegation warning issue is not an error.

 

The Delegation issue means that you could not delegate the data process to the data source itself, instead, you could only process data locally within your app. In default, you could only process 500 records at most locally. You could consider change this limit, so that you could process 2000 records at most locally.

Note: Please consider change the "Data row limit for Non-delegable queries" option to 2000 within Advanced settings of App settings of your app.

 

If the amount of your SP List is not more than 2000, you could ignore this warning issue. If the amount of your SP List records is more than 2000, you could consider bulk-load SP list records into a collection in your app, then use the collection as data source in your app instead of your original SP List data source.

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M7...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Loading-60-000-SharePoint-List-Items/m-p/448...

http://rezadorrani.com/index.php/2019/09/18/powerapps-delegation-with-sharepoint-as-a-data-source-wi...

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,313)