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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Restrict text in textbox
Power Apps
Answered

Restrict text in textbox

(0) ShareShare
ReportReport
Posted on by 37

Need a help. In my app user is asking for option of a textbox where they can only be able to type 0, 1 or NA or it can be left blank. Initially we created combo box and restricted but user wants to type in. Please let me know if this can be acheived in PowerApps.

 

Thanks

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    ["",0,1,"N/A"]

    In the items property of a dropdown control. 

    Or [0,1,"N/A"] As items in a radio control with the default property left blank

    Having to type in and being told they are wrong or trying to guess the right answer is not a good user experience. What if they type in "one"?

  • cbroy_22 Profile Picture
    37 on at

    But that's for dropdown, but they do not want dropdown, can this be done in textbox? I believe ISMatch will work but can't exactly figure tout the syntax.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @cbroy_22,

    Do you want to force users only input 0, 1, NA or leave blank in the TextInput control?

     

    If so, please set the OnChange property of the TextInput as below:

    If(
     !(IsMatch(
     TextInput19.Text,
     "^[0-1]*$|(NA)"
     )),
     Notify(
     "Plese input valid characters or numbers!",
     NotificationType.Error
     )
    )
  • cbroy_22 Profile Picture
    37 on at

    Thanks Qi.. this was what I was looking for

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard