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 / Displaying the chosen ...
Power Apps
Answered

Displaying the chosen option from dropdown form in an outside text box

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a form in PowerApps that uses a dropdown list with pre-determined values. Below is how I'm getting the list of teams from my Sharepoint List:

Sort(
Filter(
Distinct(
ShowColumns(Teams,"Team")
,Team) , Result <> "Individual"),
Result, Ascending)

I also have a separate textbox where I'm trying to display the the chosen option from the dropdown list. So for example, if the user selects Team 1 from the dropdown list (without submitting the form) I want to display "Team 1" in the textbox. The problem is the codes below do not return anything. The formula bar says the result is Blank.

DataCardValue4.Selected.Result
DataCardValue4.SelectedText.Result 
DataCardValue4.SelectedText.Value 

Is there a way for me to display the chosen option in a separate textbox? 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @byr10112 

    Your first formula is correct - DataCardValue4.Selected.Result will provide the selected Result property of the dropdown.

    If you are putting this into a TextInput control, then you would put that formula on the Default property.

     

    Also, you might consider revising your Items property formula to the following:

    Sort(
     Distinct(
     Filter(Teams, Team <> "Individual"),
     Team
     ),
     Result, 
     Ascending
    )

    Always better to narrow your results first with the Filter and then use other functions on that.  

    Note also:

    1) You don't need the ShowColumns function.  This does not do what many think - only return those columns from a datasource, thus improving performance.  The reality is, it always get ALL of the columns and then returns just the ones provided...so there is no gain to it and it only then serves to slow down the function.

    2) Your original was not delegable because Distinct is not delegable and that was your first function on the datasource.  This provided function is closer to delegable, but still not delegable because you are using the <> operator...which is not delegable.  So, if delegation is not needed, then you are fine.

     

    I hope this is helpful for you.

  • byr10112 Profile Picture
    Microsoft Employee on at

    Hi @RandyHayes 

     

    Thanks for your reply. I updated my items property as you suggested.

     

    However, I still cannot display the result in the textbox. It says "DataCardValue4.Selected.Result = Blank | Data type: text"

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @byr10112 

    Should be working just fine.  So, what is the difference??  What environment is this, is this a Canvas app?

  • byr10112 Profile Picture
    Microsoft Employee on at

    Yes, Canvas app. Could it be because the dropdown list is a part of a form? 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @byr10112 

    No, it works fine to reference a control in a form (some exception to that during a SubmitForm).

    If you see a value in the dropdown in the form, then your control outside of the form should reflect that.

    Are you simply displaying the value outside of the form, or are there other factors - like SubmitForm being done and it is not showing, or there is some other factor?

  • byr10112 Profile Picture
    Microsoft Employee on at

    Simply displaying it 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @byr10112 

    Well, something is afoot!  This process definitely works fine.  We split the interface from the Form all the time and rely on that happening and have never seen it go wrong.  

    Thinking there is something in a new version release...I just tried it all out and it worked perfectly.

    In the test, I simply have a form with a datacard in it that has a dropdown control.  Similar items formula.  Outside of the form, both a label and a TextInput control, both set to derive the value from the selected item in the dropdown.  All good!

     

    What do you get if you put the control from outside the form into the datacard with the dropdown?

  • byr10112 Profile Picture
    Microsoft Employee on at

    That's weird. When I put the control from outside the form into the datacard with the dropdown it shows all blank but the form's dropdown still works. 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @byr10112 

    Then there is something wrong with the dropdown.  Are you sure it is the correct control name you are referencing?

    If you put another dropdown in the datacard and leave the default DropDownSample as the datasource/items, then reference that in a similar or same control as you are trying, does it show the correct selection (it is Value based)?

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard