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 / Time sheet with qr bar...
Power Apps
Answered

Time sheet with qr barcodes

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an app that I have employees scan their QR code.  I have been trying to get the app to read the code then see if it has been scan once already today.  So I have a lookup in the OnScan that i have barcodescan.value and date, but i can't get the date correct to see if it has been scanned for that day.  I want it to check the barcode to see if it has been scanned today, if it has then it will move to the Lunch in and Out screen but if its blank then it goes to Clock In screen.

 

This should be an easy fix but I can't seem to find the right column type or whatever the date column needs to be.

 

Thanks for the help!

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Anonymous ,

    I am assuming the day is the current day? You need something like

    With(
     {
     wScanned:
     LookUp(
     YourListName,
     YourBarcodeField=barcodescan.value
     )
     },
     If(
     !IsBlank(
     Filter(
     wScanned,'
     IsToday(YourDateField)
     ).YourDateField
     ),
     Navigate(YourLunchScreen)
     )
    )
    

    Note the With() statement is only to avoid the Delegation warning on the date query.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    What do I need to add to navigate to another screen if the barcode hasn't scanned today?  

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am trying this but still getting error.

     

    With({wScanned: LookUp(TimeClockTest, Item=BarcodeScanner3.Value)}, If(!IsBlank(LookUp(wScanned, IsToday(Date/Time)).Date/Time), Navigate(ClockInOut), Navigate(LunchInOut)))
     
    what am i missing?
     
    Thanks!
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Anonymous ,

    Firstly, what is the error? 

    Your code

    With(
     {
     wScanned: 
     Filter(
     TimeClockTest, 
     Item=BarcodeScanner3.Value
     )
     }, 
     If(
     !IsBlank(
     LookUp(
     wScanned, 
     IsToday(Date/Time)
     ).Date/Time
     ), 
     Navigate(ClockInOut), 
     Navigate(LunchInOut)
     )
    )

    is the correct syntax structure, however one thing that I notice is the field name Date/Time - have you tried 'Date/Time'  ?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    here is my code now,

    With({wScanned: LookUp(TimeClockTest, Item=BarcodeScanner3.Value)}, If(!IsBlank(LookUp(TimeClockTest, IsToday('Date/Time')).'Date/Time'), Navigate(ClockInOut), Navigate(LunchInOut)))
     
    It has a delegation warning now, but I have reset my data set to 2000.
     
    Thanks!
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    HI @Anonymous ,

    wScanned is to avoid the Delegation warning and you need to refer to it in the LookUp

    With(
     {
     wScanned: 
     Filter(
     TimeClockTest, 
     Item=BarcodeScanner3.Value
     )
     }, 
     If(
     !IsBlank(
     LookUp(
     wScanned, 
     IsToday('Date/Time')
     ).'Date/Time'
     ),
     Navigate(ClockInOut), 
     Navigate(LunchInOut)
     )
    )

    You will always get a Delegation warning on non-delegable queries directly on the data source even if the current items numbers are under the Delegation limit as they could increase in the future.
    Note importantly that the first filter on the barcode scanner needs to produce an item count under your limit (you will not get a warning on this however).

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    HI @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi WarrenBelz, no I am still not getting the results I need.  Do I need to check on the column type in my SP list?  here is a different code i have tried but still not getting the results.  

     

    With({wScanned: LookUp(TimeClockTest, Item=BarcodeScanner3.Value)}, If(!IsBlank(LookUp([TimeClockTest], User().Email = Item &&BarcodeScanner3.Value=Today()), Navigate(ClockInOut), Navigate(LunchInOut)))
     
    I want to Scan the QR code, then check SP list to see if they have checked in Today, if they have then they navigate to LunchInOut screen, but if they haven't checked in today then it navigates them to ClockInOut screen.
     
    Again thank you for your help.
     
     
  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Anonymous ,

    I will go another way on this - the LookUp should have been a Filter (danger of free-typing), but I will also add some different logic in the lower part.

    With(
     {
     wScanned: 
     Filter(
     TimeClockTest,
     Item=BarcodeScanner3.Value
     )
     },
     If(
     CountRows(
     Filter(
     wScanned,
     IsToday('Date/Time') &&
     'Created By'.Email=User().Email
     )
     ) = 0,
     Navigate(Screen1),
     Navigate(Screen2)
     )
    )

    Can you please leave the bottom filter on wScanned - the whole idea is to get a Delegable filter and the top With() statement pre-filters and allows this. I have added your logic on the User - if this is not needed, remove it.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard