Power Apps SetFocus() Function

There is a very interesting function in Power Apps that improves user experience: SetFocus().

The question I asked myself is: “Is it possible to suggest to users which field to fill out? And the next one?”

Yes, it is.

I open my app and create something like the following image:

On the “Arrow” button, I set the “OnSelect” function with the following formula:

SetFocus(TextInputCanvas1);

TextInputCanvas1 is the first text input that I need to fill out.

At this point, when I press the “Arrow” button, a small animation will appear at the bottom of the TextInputCanvas1 field.

I use the same functionality on the “Save” button but relate it to TextInputCanvas2 (second field) with this formula:

SetFocus(TextInputCanvas2);

Similarly, upon pressing the “Save” button, TextInputCanvas2 will also be highlighted at the bottom of the field.

Advantages:

💠 Smoother UX: instantly sets focus on a new control or dialog box, so users are not stuck with persistent dropdown lists.

💠 Clear guidance: guides users through complex forms or screens in a logical step-by-step flow.

💠 Accessibility: excellent for screen reader users or anyone who benefits from clear visual cues.

Boom Done 💣

Follow me:

LinkedIn

YouTube

Instagram


Discover more from BEYOND THE PLATFORMS

Subscribe to get the latest posts sent to your email.


Comments

Leave a comment