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

undefined

(0) ShareShare
ReportReport
Posted on by 17
  • ,In a form I ,there is a text input field in that field user are able to enter numbers only,if they enter alphabets and special characters the text input will become red,if they enter number it will in default white colour.

 

I tried this validation in fill property of text input If(IsMatch(Datacardvalue.text,Match.MultipleDigits),RGBA(255,255,255,1),RGBA(255,85,85,0.5))

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

     

    If(IsNumeric(Self.Text),Color.White,Color.Red)

     

  • New_1 Profile Picture
    17 on at

    Hi@TheRobRush sorry I forgot to mention one requirement that in textinput "AT" must be always there apart from AT only numbers must be allowed,if we type alphabets and special characters the text input box should turn into red,if they entered numbers it will be in normal white colour, kindly help me with this ,

    I tried this validation If(IsMatch (Dataacardvalue.text,"A"&"T"&Match.MultipleDigits), colour.white, colour.red)

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Is "AT" just randomly.places somehwere in the string or is it the beginning or end etc.

  • New_1 Profile Picture
    17 on at

    AT is in the beginning and it is autopopulated after AT only numbers is allowed apart from that if we enter anything textbox must turn red colour if there is no error it will in default colour @TheRobRush 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    If AT is always in first 2 positions, and can never be added again mid or at end of string then this will sufffice

    If(IsNumeric(Replace(Self.Text,1,2,Blank())),Color.White,Color.Red)

     

    If for some reason there may ever be a change to where something is in front of it or theres at 2x etc then 

    If(IsNumeric(Substitute(Self.Text,"AT",Blank())),Color.White,Color.Red)

     

    would be used

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