Add the ability to control if a control is "Focus"ed on. For example, in my screen OnVisible property I might set TextBox1's Focus property to true so that when my screen becomes visible the cursor appears in the first text box on my screen.
This is desperately needed by us! We are using Honeywell CT50 handhelds which have a built in 2d Barcode scanner, and we would like it so that the end user does not have to tap the screen to set the focus to the relevant field.
@Audrie-MSFT, I think that this functionality would be an absolute boon to the applications, and there are a number of possibilities which, if it was available, would open up to the PowerApps community, especially in the area of handheld devices and scanners.
Could you please take a moment to cast your eye over this and see if this is something which would be worthy of passing up to the dev team?
I myself have written a complete app for auditing and scanning, but in our trials the need to continually press in the textsearchbox for the scanner to be able to insert the barcode increased the time taken to perform the work by a factor of 2, as opposed to manually handling the process.
I'm trying to work with a cardreader app that uses a keyboard 'wedge' to insert card details into the keyboard buffer. Need to reliably put the focus in a [hidden] text input control my PowerApps app page to receive the card details. Tried playing with tab indexes but can't get it to work - we need SetFocus!!!
In that instance have you tried instead to get the hidden field to get the data from the text input search box? Or use another text input search field which is hidden to receive the input which then does a call to the data search?
Updating to review, flagging @GregLi to take a look.
In the meantime, for the many users commenting about needing this for barcode scanning scenarios, note that the new ScanBarcode() funciton is now available as an experimental feature and may address several of these use cases. Enable the feature in the Advanced Settings tab; Scan Barcode() will trigger on any event (such as button OnSelect) and automatically pop the device's native scanner on iOS or Android.
This functionality is now available for canvas apps.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-setfocus