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 / Restrict the number of...
Power Apps
Answered

Restrict the number of Letters in a Text Field

(0) ShareShare
ReportReport
Posted on by 2

Hello Everyone,

 

I have a SharePoint list on which i have several text fields. I want that, when a user fills the information to the respective field, PowerApps should accept only specific number of letters in the fields. For Example the year field must have 4 columns. So until user enters four letter/numbers PowerApps should not accept it.

 

Similar we see while entering on the Credit Card number of several sites. If we add more or less numbers then we get an error saying that incorrect number. Can anyone please suggest any suitable way/workaround?

 

Regards,

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    You can use the Maximum lenght property for the purpose.

    If it should be 4 letters type: 4

    maximum length.JPG

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • AkshayManke Profile Picture
    2 on at

    Hi @eka24

     

    Many thanks for the answer. One more question please. I want a specific number to be entered. In other words, I want the letters should not be less than 4 as well. How can i limit it?

     

    Regards, 

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    A number of Options:

    1. DisplayMode of the Save Button:

    If(Len(TextInput8_1.Text)<>4,DisplayMode.Disabled,DisplayMode.Edit)
     
    Or
    2. Notification On presing the save Button:
    If(Len(TextInput8_1.Text)<>4,Notify("Number of Characters should be 4"),SubmitForm(FormName))
     
    You can play with the equation sign: <, >, =
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • AkshayManke Profile Picture
    2 on at

    Great. Many Thanks @eka24. This was exactly 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

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