I have a PowerApp that I am using to log students as they come in. I want to allow them to enter their ID numbers via numeric pad as well as scan their ID cards. I have a variable for the Student ID and a TextInput for the Student ID. The Student ID TextInput has its default value set to the VAR_StudentID variable. For each keypad number I have the following code:
Set(VAR_StudentID, Concatenate(VAR_StudentID, "1"))
Then I have a field where I lookup their names based on the Student ID entered with the following code:
LookUp('All Students', OtherID=VAR_StudentID, StudentName)
Problem: When I use the scanner to populate the Student ID TextInput directly instead of using the keypad, it does not do the lookup for the student name because the variable VAR_StudentID doesn't have any value because the TextInput was set directly.
I cannot figure out how to get both scenarios to work (keypad vs. scanner). Screenshot is attached.
Awesome, that worked just fine, thanks!
Oh ok. You could add a check in button that would kick off everything you want to do after the value is in the text input box. You could also try to use the on change property to update the same variable you use with the keypad when you scan something into that input box: OnChange: Set(VAR_StudentID, Self.Text)
Unfortunately I dont have a way to test this for you to be sure of a solution.
I'm using an external bar code scanning device which is not supported by the BarcodeReader control in PowerApps so this solution will not work for me.
I would just use the scanner to update the variable instead of the actualy text input. I havent used the new scanner but I imagine something like this would work:
OnScan -> Set(VAR_StudentID, First(BarcodeReader.Barcodes).Value); Reset(BarcodeReader);
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2