cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

limiting number field to allow entering 6 digits

Hi,

 

In my powerapp, I have a need to allow users to enter only 6 digits for a number field coming from sp list. If they enter more than 6, I would disable submit button, can someone please help me with the expression for number field validation, thanks in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@Anonymous 

You can change the MaxLength property of the Text Input to this code

6

 

Or you can disable the button by putting this code in the DisplayMode property of the button.

If(Value(TextInput_MyNumber.Text)<1000000, DisplayMode.Edit, DisplayMode.Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
mdevaney
Super User
Super User

@Anonymous 

You can change the MaxLength property of the Text Input to this code

6

 

Or you can disable the button by putting this code in the DisplayMode property of the button.

If(Value(TextInput_MyNumber.Text)<1000000, DisplayMode.Edit, DisplayMode.Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,086)