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 / 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard