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 / Set dropdown selected ...
Power Apps
Answered

Set dropdown selected item to match that of a Label

(0) ShareShare
ReportReport
Posted on by 3

Hi there,

 

I have a dropdown (NOT a ComboBox) with Default: ddDefaultValue

 

I also have OnVisible: UpdateContext({ddDefaultValue: "No Multiplier"}) - this sets the dropdown to "No Multiplier" - my chosen default value for this dropdown upon opening the app.

 

I want to create a button that looks at the value of Label1 (a text label) and enters this into the dropdown.

 

I've tried creating a button with OnSelect: UpdateContext({ddDefaultValue: Label1.text}) but this does not work and simply clears the dropdown - does anyone have any ideas please?

 

Many thanks 🙂

Categories:
I have the same question (0)
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @TheMaster 

     

    Consider the following:

    • Items which the source the dropdown will display
    • Default as the first item to display
    • Another value to set to default, is a value present in the Item source

     

    OnVisible

    Set(varData,["No Multiplier", "Your Value of Label1", "Another Vlaue"]);

    UpdateContext({_defaultData: "No Multiplier"})

     

    Button

    OnSelect = UpdateContext({_defaultData: Label1.Text})

     

    This will set you default value to the label text. if the label's text is not in the source (Item) it will revert to the first item.

     

    PS what is you Items set to and what is the value of the label?

     

    I hope this helps,

    R

     

     

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

#2
11manish Profile Picture

11manish 224

#3
Valantis Profile Picture

Valantis 181

Last 30 days Overall leaderboard