Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Validation on clicking button || Lenght of text input

(0) ShareShare
ReportReport
Posted on by 390

Good afternoon everyone,

I have an issue about my "Crear" button: I want it to be able to click if the "ID FISCAL" text input is with only 11 characters, no more or less.

Thank you,

Jose

Categories:
  • Community Power Platform Member Profile Picture
    on at
    Re: Validation on clicking button

    @JoseC12 

    You can utilise the StartsWith() function to help here, like this

     

    !(StartsWith(Input_IDFiscal.Text, "20")), Disabled, Edit

     

    see here https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-startswith

  • JoseC12 Profile Picture
    390 on at
    Re: Validation on clicking button

    Thank you to solve me that problem.

    Can I also validate to not click the submit button if the "ID FISCAL" text input does not start with "20" for example?

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Validation on clicking button

    @JoseC12 

    Add this to your formula

     

    || !(Len(Input_IDFiscal.Text)=11) ...

     

    EDIT: @PowerAddict  typing at the same time 🙂

  • Verified answer
    PowerAddict Profile Picture
    7,314 Most Valuable Professional on at
    Re: Validation on clicking button
    Simply add this to the DisplayMode property of your button:

    If(Len("ID Fiscal".Text) =11, DisplayMode.Edit)

    You can combine this with the rest of the logic for the DisplayMode of that button if you like.

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1