cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nurbmr
Helper I
Helper I

Only navigate if record exist

Hi, 

I'm trying to figure out how to only allow the screen to navigate away from the login screen if the user record exists in the database. The detailed scenario as follows: 

 

Screen_Login has a barcode scanner which a user will scan and it will navigate to another screen only if the user's QR code value match the Employee ID in the database. BarcodeScanner1 OnScan property is 

Set(V1, BarcodeScanner1.Value);If(LookUp(Database1,EmployeeID=V1)),Navigate(Screen_LoginSuccess);

However, this syntax is not working. What should be changed?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @nurbmr try replacing the lookup with in or filter.

 

If(V1 in Database1.EmployeeID, Navigate(Screen_LoginSuccess,ScreenTransition.None),Navigate(App.ActiveScreen))

 

hope this helps

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @nurbmr try replacing the lookup with in or filter.

 

If(V1 in Database1.EmployeeID, Navigate(Screen_LoginSuccess,ScreenTransition.None),Navigate(App.ActiveScreen))

 

hope this helps

Hi @rubin_boer ,

 

I use the in function and it works! Thank you so much! 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,521)