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 Apps
Answered

Scan Time-Out

(0) ShareShare
ReportReport
Posted on by 43

How can I put Time-Out on the same line as Time-In?

What code should I do?

Kindly see attached file. TIA

Scanning out Error2.png
Scanning out Error.png
Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Eaglekad_7 ,

     

    You should get the LAST entry that belong to current employee rather than the First one using LookUp:

    Patch(Attendance, Last(Filter(Attendance, Employee = Out.Value)), {TimeOut: Now())}

     

    Best regards,

  • Eaglekad_7 Profile Picture
    43 on at

    I have an error code here. Kindly see attached file. Thank you for your quick response

    Error3.png
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Eaglekad_7 ,

     

    Sorry, it's:

    Patch(Attendance, Last(Filter(Attendance, Employee = Out.Value)), {TimeOut: Now()})

     

    Best regards,

  • Eaglekad_7 Profile Picture
    43 on at

    Thank you Sir @v-jefferni, you're so great!

     

    How about Message Pop Up when the scan Time-in and out is successful?

     

    Thank you!

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Eaglekad_7 ,

     

    Then you just need to use a Navigate function following the Patch. However, in case that the Patch may fail, using an "IfError" function to check the Patch result is more efficient & appropriate.:

     

    IfError(Patch(Attendance, Last(Filter(Attendance, Employee = Out.Value)), {TimeOut: Now()}), Notify("Something went wrong, please try again", NotificationType.Error), Nevigate(PopupScreen))

     

     

    Best regards,

  • Eaglekad_7 Profile Picture
    43 on at

    Hi Sir @v-jefferni ,

     

    After trying to add Popup Screen after scan there's an error in our Code.

    Screenshot 2023-11-22 083114.png
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Eaglekad_7 ,

     

    I didn't see any errors in your screenshot...

     

    Best regards,

  • Eaglekad_7 Profile Picture
    43 on at

    Hi Sir @v-jefferni

     

    Kindly see attached file. Thanks for your help!

    Error 3.png
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Eaglekad_7 ,

     

    Please copy the formula and paste it here in Text.

     

    Best regards,

  • Eaglekad_7 Profile Picture
    43 on at

    Hi @v-jefferni 

     

    Already solved the issue. Thank you for your help. God Bless!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard