cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
indhaa
Responsive Resident
Responsive Resident

Jumping to the next field

HI

 

Want to clarify something. I'm able to jump to the next field using the Tab.

I want to know if there is a way to do for a particular field automatically without the tab. For example when a user enter Mac address, so after inputting 2 char on MAC1 to go to MAC2 field. The maximum character for these fields are limited to 2 characters.

 

Is it possible to implement this using the SetFocus. I tried to use this for 'OnChange' property with below code 

                      

If(Len(MAC_1.Text) = 2, SetFocus(Mac2), SetFocus(Mac1))

 

Am I doing this wrong

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@indhaa 

OnChange will only occur if you hit enter on the TextInput control.

Instead, you can achieve this easily by doing the following:

1) Insert a Toggle Control on your screen.  You can set the Visible property to false.

2) Set the Default property of the toggle to : Len(MAC_1.Text) = 2

3) Set the OnCheck property of the toggle to : SetFocus(Mac2)

 

This will give you the automatic jump to the next input control that you are looking for.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

2 REPLIES 2
LRVinNC
Super User
Super User

Your statement is correct, but it will not auto-advance to the next field when you type the second character.  You still have to hit enter.   Then it will evaluate if it was 2 characters and if so, it will go to Mac2.  If more or less than 2 characters it will go to Mac1.  I don't know of any way to autoadvance at the point the second character is input.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
RandyHayes
Super User III
Super User III

@indhaa 

OnChange will only occur if you hit enter on the TextInput control.

Instead, you can achieve this easily by doing the following:

1) Insert a Toggle Control on your screen.  You can set the Visible property to false.

2) Set the Default property of the toggle to : Len(MAC_1.Text) = 2

3) Set the OnCheck property of the toggle to : SetFocus(Mac2)

 

This will give you the automatic jump to the next input control that you are looking for.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (26,567)