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 / Unable to autopopulate...
Power Apps
Unanswered

Unable to autopopulate text field or label based on another text field value

(0) ShareShare
ReportReport
Posted on by

Hi

I am new to PowerApps and Dataverse.

I am trying to auto populated data in text field 2 based on changes in text field 1. 

I wish to show data on label2 / text field2 based on change in data in text field1.

 

I tried following steps:

  1. Using vertical gallery on canvas to pull data from Dataverse. Table has COUNTRY names.
  2. On right hand side I am populating form with CITY names based on selected COUNTRY name in gallery.
  3. When user select COUNTRY = Denmark, on right hand side gallery, then text field 1 gets populated with capital of Denmark = Copenhagen (using data from Dataverse CAPITAL column).
    I want: Text field 2 or Label 2 should automatically fill names of various languages spoken in Copenhangen.
    Using LANGUAGES column in dataverse.

    Example:

            For Country = Denmark, Text field 2 should show= Danish, English, Norwegian.
            For Country = Finland, Text field 2 should show= Finnish, English, Danish, Swedish

 

  • I am able to get capital city name in text field when user select specific country name on vertical gallery list.
  • I am unable to populate languages names in text field 2 based selected country names. I could get 1 language name in text field 2 however I want all languages related to each respective country in text field 2 and I am unable to get it.
  • I tried to keep text field 2 outside the form and also inside the form however could not get all languages list related to specific country.

Any help or guidance will be appreciated.

My form and table screenshot is attached:

 

I have the same question (0)
  • janson Profile Picture
    62 on at

    Hello @BradAugustene23,

     

    You need to use the below formula to concatenate multiple languages into a single text.

     

    Concat(Filter(Countries, Name = ThisItem.Name), Language, ", ")

     

    If you are using a form, you will have to unlock the specific card and put the above formula in the Default property of the card.

    janson_1-1686634551950.png

    Let me know if this helps.

  • Brad_Augustene Profile Picture
    2 on at

    Hi Janson

    Thanks for sharing concat script.

    I tired to write similar script as you wrote and unfortunately I am doing something wrong so it is not showing the right result.
    I could not understand Name=ThisItem.Name in your script.

    Please view attached screenshot.

    So I used TxtLanuage instead of Name and drafted my script as:

    Concat(Filter(TblCountryList, TxtLanguage = ThisItem.text),Spoken Languages , ", ")

    I basically want: When user select country name in gallary glrCountryList, then TxtLanguages textbox should show all spoken languages from table TblCountryList  column name Spoken Languages.

  • janson Profile Picture
    62 on at

    Hello @Brad_Augustene,

     

    This should work.

    Concat(Filter(TblCountryList, 'Country Name' = glrCountryList.Selected.Value), 'Spoken Languages', ", ")

     

    janson_0-1686665933777.png

     

     

    You may want to improve the app by following conventions. A few suggestions from my end...

    1. Name the table without the Tbl prefix or the List suffix. It is better to name it as just Country and accept the Plural name suggested by Power Platform (which in this case would be Countries)
    2. Name the columns without additional suffix. Since the table itself is Country, you can just use the Primary column as is, which is "Name". It is understood that Name in Country table represents Country Name. You can rename "Capital City Name" as "Capital City" as it is implied that a text column with the name "Capital City" is the name of the city.
    3. You may want to normalize the table. The "Spoken Languages" can be stored in another table which a Lookup to Country table.
    4. In Canvas App, the prefixes like "glr", "txt" are no longer used in modern conventions.

    Again, the above suggestions are useful in larger apps. If your app is very simple, you may ignore them 🙂

     

    If this worked for you, please accept the answer.

  • BradAugustene Profile Picture
    71 on at

    Hi Janson

    Your solution worked 100% perfectly.

    Besies it, THANK YOU very much for guiding me with best practices.

    I am unsure how to mark your comment as ACCEPTING THE SOLUTION.

  • janson Profile Picture
    62 on at

    Hello @BradAugustene,

     

    Glad I could help. You should be able to accept the solution by clicking on the vertical menu (three vertical dots) against my answer.

     

    janson_0-1686749026004.png

     

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