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 / Use a button to select...
Power Apps
Suggested Answer

Use a button to select dropdown value for a SharePoint list form

(1) ShareShare
ReportReport
Posted on by 62
 
Hello all,
 
I have a form connected to a SharePoint list with one of the fields being "Status", where you can mark yourself as "On Duty", or "Off Duty". I want to use buttons to set this dropdown, but I can't make it work.
 
Currently I have an "On Duty" button with:
 
OnSelect = Set(varDropDownDefault, "On Duty")
 
And my form dropdown has the following:
 
Items = Choices([@ELogBookTestData].Status)
OnChange = Set(varDropDownDefault, Self.Selected.Status)
DefaultSelectedItems =  If(!IsBlank(varDropDownDefault), Filter(Choices([@ELogBookTestData].Status), Value = varDropDownDefault), Parent.Default)
 
The dropdown doesn't respond to pressing the button. Any help with how to fix this would be much appreciated!!!
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    393 Moderator on at
    Good Afternoon,
     
    So in your example I copied it pretty closely.
     
     
    Button9 is my button
    I have values
    ["", "On Duty", "Off Duty"]
     
    Onselect for button9 is:
    Set(varDropdownTest, "On Duty");
     
    Then default for Dropdown2:
    If(Button9.Pressed Or !IsBlank(varDropdownTest), varDropdownTest, 1) will update it for me.
     
    If this answers your question please select it as the answer so others can find it if you are still having issues please feel free to let me know.
  • LW-03031325-0 Profile Picture
    62 on at
    Hey MMcCloud,
     
    Many thanks for your reply! I'm not sure why but I'm not having any luck with your strategy, the dropdown stays blank so it must be something with my app. Still, good to know about the Button.Pressed functionality. In the meantime, I've set DefaultSelectedItems = [varDropDownDefault] and that is working sufficiently for now.
     
    Appreciate you taking the time to help. :)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard