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 / How to populate a Labe...
Power Apps
Unanswered

How to populate a Label Field based on the pattern of the text provided on the Text Input Field

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

Good Day Everyone!

I have a Text Input Field (CONTRACT NO) and a Text Label Field (CLASSIFICATION) and would like to ask for help on how to populate the Text Label Field based on the pattern/format of the Text Input Field.

I have a lookup table as shown below:

 

TEXT INPUTPATTERNCLASSIFICATIONPATTERN DESCRIPTION
9123456789#########Class A9 Numeric Characters that starts with number 9
3-123453-#####Class A7 Characters that starts with number 3 followed by - and 5 numerical characters
C1234-BCC####-XXClass B8 Alphanumeric Characters that starts with Letter C followed by 4 numerical characters then - and 2 letters
XYZ1234XXX#####Class B8 Alphanumeric Characters that starts with 3 letters followed by 5 numerical characters

 

ex:

CONTRACT NO912345678
CLASSIFICATIONCLASS A

 

 

Thanks in advanced.

 

Categories:
I have the same question (0)
  • Moreshwar Profile Picture
    135 on at

    Hi,

     

    You can use variable for it and then use this variable value to update Label Text. For Example: OnChange of Text field you can use formala UpdateContext({varLabelVal:LookUp(ABCList,Pattern = TextField.Text, CLASSIFICATION}); 

    Then use this variable "varLabelVal" and set text property of label.

  • R Bakker Profile Picture
    725 on at

    Would this work?

    Text(Value(TextInput01.Text),"[$-en-US]9000000000")

    Text(Value(TextInput02.Text),"[$-en-US]3-00000")

    Text(Value(TextInput03.Text),"[$-en-US]C0000-XX")

    Text(Value(TextInput04.Text),"[$-en-US]XXX0000")

    You may want to set the MaxLength property of your text inputs as well.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard