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 / Text input with number...
Power Apps
Unanswered

Text input with numbers only

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I would like to make my text input box only accept 6 digit numbers only. Additionally, I would also like to make it so that whichever 6 digit number that is entered is looked up in reference to the SharePoint list that is connected to my app. I am not sure how to go about that. After this number is looked up, a pop-up should occur letting the user know that the number they entered was found in the records.

 

Thank you

Categories:
I have the same question (0)
  • vaubeee Profile Picture
    533 on at

    Hi! I assume you are speaking about a canvas app. You could set the txt input properties as follows:

    Format: Number

    MaxLength: 6

    Hint Text: "Input 6-digit number"

    OnChange - due to lack of infos, just a basic logic 🙂 :

    If(

    Value(Self.Text) = *yourDataSourceColumn*.Value,

    Notify("Number already used",NotificationType.Information),

    Patch()

    )

     

    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    I've made a test for your reference:

     

    Set the text input control's Default property to:

    "000000"

    Set it's OnChange property to:

    If(
     !IsMatch(Self.Text,"\d{6}"),
     Reset(Self);Notify("input box only accept 6 digit numbers only"),
     If(
     !IsBlank(DataSource,ColumnName=Self.Text)),
     Notify("number was found"),
     Notify("number not found")
     )
    )

     

    Best Regards,

    Bof

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard