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

View solution in original post

Hi @rubin_boer ,

 

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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