Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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:

 

Categories:
  • janson Profile Picture
    62 on at
    Re: Unable to autopopulate text field or label based on another text field value

    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

     

  • BradAugustene Profile Picture
    71 on at
    Re: Unable to autopopulate text field or label based on another text field value

    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
    Re: Unable to autopopulate text field or label based on another text field value

    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.

  • Brad_Augustene Profile Picture
    2 on at
    Re: Unable to autopopulate text field or label based on another text field value

    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
    Re: Unable to autopopulate text field or label based on another text field value

    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics