web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Check in and Check out...
Power Apps
Answered

Check in and Check out function

(0) ShareShare
ReportReport
Posted on by 87

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

Categories:
I have the same question (0)
  • Verified answer
    sayyed007amir Profile Picture
    357 on at

    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.

  • Terrencew Profile Picture
    50 on at

    I'm looking to create an app that does the same thing. Is there a screenshot you can provide that shows how to do the following:

    - 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)

  • Solutionm8 Profile Picture
    92 on at

    Hi @Terrencew 

    I once did a similar app, and used the following method to keep track of the Employees check in / check out status.
    I then used the locEmployeeStatus variable to build the logic that controls if an employee could check in again and text messages in the app.

    I've create a video tutorial for the check in / check out app that implements code below:  Create an Employee Check-In/Check-Out App | Power Apps Tutorial  

    UpdateContext(
     {
     locNewestRecord: First(
     Sort(
     'Employee Check in check out',
     'Check In',
     SortOrder.Descending
     )
     )
     }
    );
    If(
     And(
     IsToday(locNewestRecord.'Check In'),
     IsToday(locNewestRecord.'Check Out')
     ),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Completed",
     ID: 1
     }
     }
     ),
     IsToday(locNewestRecord.'Check In'),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Awaiting Check Out",
     ID: 2
     }
     }
     ),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Awaiting Check In",
     ID: 3
     }
     }
     )
    )

     


  • Terrencew Profile Picture
    50 on at

    Awesome video! I'm thinking of setting up an iPad at our receptionist desk. Sort of like a kiosk.

     

    Can you tell me how you added employees? I'd like for employees to come to the iPad search their name and then begin the check in/out process.

     

    Thanks for your help!

  • Solutionm8 Profile Picture
    92 on at

    Hi @Terrencew 
    Thanks, appreciate it! 

    Great question. As you can see mine is based on the concept that users uses their own phones to check in. Meaning they are signed in with their own account already. When they check in their user is visible in 'Created By' field in SharePoint.

    I think there are several ways to approach your kiosk idea. However it depends at bit on your organizations setup and your licenses (Watch out for multiplexing).
    Does all the employees have an account in your Microsoft tenant?

     

    If yes, then one idea could be to implement sign in / sign out functionality in the kiosk app.

    Another approach, if all employees have an account, could be to add a 'Person' column in the SharePoint list and include that as a choice before you check in or check out. Remember to include the selected person in the filter to do the registration status check.

     

    If not all of the employees have an account, you could create a second list in SharePoint containing Employees. You could then use that lists as a lookup in your app, and place the name value in a text field you create in the check out/ check in list list. If an employee does not exists, you could allow them to register a new employee in the employee list. Again remember to include the selected person in the filter to do the registration status check. 

     

    I hope it gave you some inspiration 🙂

  • Terrencew Profile Picture
    50 on at

    Yes, you definitely inspired me to create this app. One last question. Can you explain what you mean when you said, "Remember to include the selected person in the filter to do the registration status check."?

  • Terrencew Profile Picture
    50 on at

    I'm using a ComboBox that is connected to a office 365 group for employees. Employees will select their name then click check in. I tried using the same formula you suggested but it doesn't seem to record the employees name on the same line with the recorded time stamp on my sharepoint list. Also, it doesn't prevent the employee from checking in multiple times. Not sure what I'm doing wrong. 

    Terrencew_0-1713980420366.png

     

    Terrencew_2-1713980555216.png

     

    Terrencew_3-1713980624907.pngTerrencew_4-1713980656011.png

     

  • Solutionm8 Profile Picture
    92 on at

    Hi 

    If you go that direction, you need to include the selected person in your Sort/filter on the SharePoint data source. Something like this, so we are able to keep track of the selected persons registration status:

     

    UpdateContext(
     {
     locNewestRecord: First(
     Sort(
     Filter(
     'Employee Check in check out',
     Employee.Email = SelectedEmployValue.Selected.Email
     ),
     'Check In',
     SortOrder.Descending
     )
     )
     }
    );
    If(
     And(
     IsToday(locNewestRecord.'Check In'),
     IsToday(locNewestRecord.'Check Out')
     ),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Completed",
     ID: 1
     }
     }
     ),
     IsToday(locNewestRecord.'Check In'),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Awating Check Out",
     ID: 2
     }
     }
     ),
     UpdateContext(
     {
     locEmployeeRegistrationStatus: {
     Text: "Awaiting Check In",
     ID: 3
     }
     }
     )
    )

     

     I just used the Employee Column (person column) from SharePoint for my combobox search. No office 365 users connector.

    Solutionm8_0-1713985874206.png

    Solutionm8_1-1713985951615.png

     

    And similarly you should also remember the above sort/filter on the patch function + patching the actual employee to the employee column in SharePoint.  

  • Terrencew Profile Picture
    50 on at

    I changed the column in Sharepoint to a (person) field. So, are you recommending to do away with the office 365 connector? I'm just not sure how you will get all employees names to show up in the drop down for employees to select their name. 

     

    I tried the formula you pasted and it's not recognizing one of your entries. 

    Terrencew_0-1713988749437.png

     

    I'm very new to powerapps and this is the first true app that I am building. Thank you for your patience. 

     

  • Solutionm8 Profile Picture
    92 on at

    Hi Terrence
    Instead of inserting a combo box directly, I have inserted an Edit form. I have connected the edit form to my SharePoint list and the selected the employee field as the only data field to display. This what you see on my picture of the app in tree view. The actual datafield where you select the employee is by default called something with DatacardValue. I have renamed that one to SelectedEmployeeValue.

    Feel free to write a direct message to me here on the power apps forum platform, if you need further assistance 🙂 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard