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

Barcode Scanner

(0) ShareShare
ReportReport
Posted on by 6

Hi,

I'm designing Power App to scan WOID. Before patching into Table 1, it needs to look up Column WOID to ensure no duplication. The formula (attached below) doesn't seem to be working correctly. Any help and advise would be very much appreciated. 

Thanks.

 

If(
IsBlank(
LookUp(
Table1,
WOID = BarcodeScanner6.Text
)
),
Navigate(
Error,
ScreenTransition.None
),
Navigate(
Successful,
ScreenTransition.None
);
Patch(
Table1,
Defaults(Table1),
{
Activity: "WO Collection",
WOID: BarcodeScanner6.Text,
Timestamp: Now(),
Username: User().FullName
}
)
)

Categories:
  • timl Profile Picture
    37,331 Super User 2026 Season 2 on at

    Hi @SOng8 

    Can you clarify what isn't working here?

    Is it not finding the record in Table1 and navigating you to the error screen, or is it not patching the record correctly?

  • SOng8 Profile Picture
    6 on at

    Hi Tim,

     

    Thanks for the quick respond.

    The lookup isn't working, it doesnt respond correctly to Navigate accordingly. The patch is working well, I have removed other logic to test just the patch. 

  • Verified answer
    timl Profile Picture
    37,331 Super User 2026 Season 2 on at

    Hi @SOng8 

    Isn't the logic here just the wrong way round? If the result of the lookup is blank (ie, there isn't a record that matches the WOID value in table 1, you want to patch a new record?

    I would also recommend that you patch the new record before navigating to 'successful' screen.

     

    If(IsBlank(LookUp(Table1,
     WOID = BarcodeScanner6.Text
     )
     ),
     Patch(Table1,
     Defaults(Table1),
     {
     Activity: "WO Collection",
     WOID: BarcodeScanner6.Text,
     Timestamp: Now(),
     Username: User().FullName
     }
     );
     Navigate(Successful,ScreenTransition.None),
     Navigate(Error,ScreenTransition.None)
    )

     

  • SOng8 Profile Picture
    6 on at

    hi @timl ,

     

    You are right, problem is resolved.

     

    Thank you.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard