web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Limiting Text input to...
Power Apps
Unanswered

Limiting Text input to certain value

(0) ShareShare
ReportReport
Posted on by 70

I made a form where I want to restrict the Text input with numbers below than 10. If the user puts any number greater than 10, he/she will get an error notification.

How can I achieve this function?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @ramtas101 ,

    Try OnChange

    If(
     Value(Self.Text)> 10,
     Notify("Numbers 10 and below", Error);
     Reset(Self)
    )

     

    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.

    Visit my blog Practical Power Apps

  • ratas101 Profile Picture
    70 on at

    Hi,

    The solution, unfortunately, doesn't work. 

  • ratas101 Profile Picture
    70 on at

    I am looking for the option where the user wont be able to enter any number greater than 10. If user enter any number above 10, he/she will get a notification error and the Textinput will reset to blank

     

  • sasrsc Profile Picture
    678 on at

    I know you probably thought of this but why not make it a dropdown list with items property set to 

    Sequence(10)

    Just a thought... saves them having to type anything ... 

  • ratas101 Profile Picture
    70 on at

    Thanks for the idea.As I am making a questionnaire with alot of 'rate this out of 10' type of questions, making all those a choice column would make it cumbersome

  • sasrsc Profile Picture
    678 on at

    I agree context is important. I'm actually a big fan of slider bars for rating things... I think the UI is rather cool and very clear to the end user. But of course, each to their own. If you trying to keep it within the standard Form though that would also require manipulation which it sounds like you don't want to do. Good luck.

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @ramtas101 ,

    That is exactly what the code I supplied will do if applied to the OnChange of the Text box - what is not working ?

  • Verified answer
    ratas101 Profile Picture
    70 on at

    I used this formula: If(Value(Datacard Value XX.Text)<0 || Value(DataCardValueXX.Text)>10,Notify("Number must be between 1-10",NotificationType.Error);Reset(DataCardValueXX)) on the OnChange property of the Textinput

     

    I have used this formula and it solved my issue. Thank you so much for your help!

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @ramtas101 ,

    That is exactly what I posted (you can use Self instead of the Control name and you do did not specify a minus outcome being possible) . . . . 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard