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 Apps
Unanswered

Number range

(0) ShareShare
ReportReport
Posted on by

Hi

I would like to give a number range to a field in my app in which numbers should be written in.

For example, only numbers from 1 to 25 should be able to entered in this field.

Do you have any trick or is this possible at all?

Thanks already!

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @Anonymous 

    Please check this amazing video by @RezaDorrani  on performing data validations

     

    https://www.youtube.com/watch?v=XvevCq6qhX4

     

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I don't think there is a direct way of validate textbox. But, here's what you can do. Take a label near your textbox.

     


    Set the OnChange property of the Text Input control (TextInput1) to following:

    If(
    Value(TextInput1.Text)<1 || Value(TextInput1.Text)>25,
    UpdateContext({ShowErrorMsg:true});Reset(TextInput1),
    UpdateContext({ShowErrorMsg:false})
    )
    Set the Text property of a Label control to following:

    "Your must type values between 1 and 25."
    Set the Visible property of the Label control to following:

    ShowErrorMsg

     

    This will reset the textinput if user enters anything other than your range and display error in label

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard