cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gennarodp
Post Patron
Post Patron

login screen with barcodescanner

Hello,

i would like to create a loginscreen in an app that use Barcode scanner.

 

In specific i have imported in my mobile app the excel table "Operators" with username and password columns.

 

I would like to concatenate this two values to enable the login with barcodescanner's support.

 

How could i do ? 

 

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions

Use the following code on the OnScan property of the scanner element.

If(
CountRows(
Filter(
TableOfLogins,
Concatenate(Username,Password) = BarcodeScanner1.Value
)
) = 1,

Navigate(Screen2,ScreenTransition.Fade),

Notify("Incorrect login, please try again",NotificationType.Error)
)

 

You will need to change the table name to your and the column names if your column names arent Username and Password.

 

I hope this helps 🙂

View solution in original post

Hi @gennarodp,

 

If(

     BarcodeScanner1.Value in

     AddColumns

          (TableOfLogins,"CheckValueColumn",Username&Password).CheckValueColumn,

     ....,

     ....

)

 

Hope it helps !

View solution in original post

16 REPLIES 16
gennarodp
Post Patron
Post Patron

Nobody ?

MatthewInwards
Resolver II
Resolver II

Could you include some screenshots of you application along with how you would like the app to work. I should then be able to help you. Also, are you using an external barcode scanner that plugs into your device, or are you using the powerapps element that taps into android and ios scanners?

Hello @MatthewInwards thank you for your answer.

 

i am using powerapps element that thap into ios.

 

the image is a simply login screen. At moment, I have two inputs (login and password) and a button that lookup login and password and permit login.

 

i would like to substitute those two inputs with barcodescanner element of powerapps that check concatenate username and password in an excel source.

 

gennarodp_0-1612083660318.png

 

 

So just to be crystal clear before I offer any code solutions. 

 

The barcode that is going to be scanned will contain the username and password within it.

e.g. if the persons user name was "John" and their password was "Crystal123" then the barcode would contain the value "JohnCrystal123"?

 

Then you would like the scanner to compare the barcode value to a concatenation of the username and password columns within your table that stores the logins. Then if they match allow them access.

 

Does what I have  wrote above sound right?

Exactly !

 

If it is correct, you should use a navigate to a browse screen, if not, there is a error message.

 

Can you help me ?

 

Thank you

Give me a little bit, I will see what code I can come up with for you 🙂

Ok thank you very much @MatthewInwards

Use the following code on the OnScan property of the scanner element.

If(
CountRows(
Filter(
TableOfLogins,
Concatenate(Username,Password) = BarcodeScanner1.Value
)
) = 1,

Navigate(Screen2,ScreenTransition.Fade),

Notify("Incorrect login, please try again",NotificationType.Error)
)

 

You will need to change the table name to your and the column names if your column names arent Username and Password.

 

I hope this helps 🙂

View solution in original post

Hi @gennarodp,

 

If(

     BarcodeScanner1.Value in

     AddColumns

          (TableOfLogins,"CheckValueColumn",Username&Password).CheckValueColumn,

     ....,

     ....

)

 

Hope it helps !

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (996)