cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bartek1
Helper II
Helper II

Check in and Check out function

Hello,

 

I am developing an app that will have two buttons - Check In and Check Out. The data is connected with my sharepoint list called EmployeeOffice.

 

I used the following formulas:

Check in button:

Set(CurrentCheckedInRecord; Patch(EmployeeOffice; Defaults(EmployeeOffice);{Title:"Office";StaffFullName:User().FullName;StaffEmail:User().Email;CheckIn:Now()}));; Navigate(CheckIn;ScreenTransition.Fade)

 

Check Out button:

Refresh(EmployeeOffice);; If(!IsBlank(CurrentCheckedInRecord); Patch(EmployeeOffice;CurrentCheckedInRecord;{CheckOut:Now()}));; Navigate(CheckOut;ScreenTransition.Fade)

 

I would like to add the following functionalities:

- you cannot check in again if you didnt check out (the message that you are already checked in should appear)

- you cannot check out if you didnt check in (the message that your have not checked in should appear)

 

I use FullName of my employees and Email address. Employee will check in and out everyday.

 

Thank you in advance!

 

Best regards,

Bartek

1 ACCEPTED SOLUTION

Accepted Solutions
sayyed007amir
Resolver II
Resolver II

You can use visible property in that case that will solve your issue very easily.
For example: Show Check In according to user and today date and for check out use if today checked in then only show that button.
Its a rough idea, you can implement.

View solution in original post

1 REPLY 1
sayyed007amir
Resolver II
Resolver II

You can use visible property in that case that will solve your issue very easily.
For example: Show Check In according to user and today date and for check out use if today checked in then only show that button.
Its a rough idea, you can implement.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (92,899)