Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

SetFocus after condition is met

I would like to SetFocus(TextInput4) after Len(TextInput3) = 1. How can I do this?



Super User
Super User

@officeadmingsf In the OnChange of TextInput3 set this,

If(Len(TextInput3.Text) = 1, SetFocus(TextInput4))

i believe that OnChange doesnt work until you click out of the text box. To clarify, if I type "2" into TextInput3, then the SetFocus isn't triggered. it is not until I press enter or tab and click out that it works. 

@officeadmingsf Yup you are right OnChange will fire only when you navigate out of the Textinput.

If you want the Reset to fire while you are still in the Textinput, we'll have to do some workaround. One suggestion would be,

You can have an hidden toggle control. In the default property of the toggle, set this, Len(TextInput3) = 1

In the OnCheck property of the toggle, set this, SetFocus(TextInput4)

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,601)