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 / Validation on clicking...
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

Formula in DisplayMode.PNG
Crear button.PNG
Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    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
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @JoseC12 

    Add this to your formula

     

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

     

    EDIT: @PowerAddict  typing at the same time 🙂

  • JoseC12 Profile Picture
    390 on at

    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?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard