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 / Dropdown based on my y...
Power Apps
Unanswered

Dropdown based on my yes/no column

(0) ShareShare
ReportReport
Posted on by 17

Hi,

 

I have a list in sharepoint lists that has a yes/no column and I want to be able to display these values on my dropdown. I've tried using filter and distinct but all it prints out is true.

 

Thanks

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Typically a yes/no column in SharePoint evaluates to true or false.   So you won't see yes/no.   I am guessing that you are trying to set the default value of your column to the value in the list item?

  • zmorek Profile Picture
    3,272 on at

    You can just set the dropdown's Items() property to ["Yes","No"] and achieve the same result

  • PA_AB Profile Picture
    17 on at

    I have another function that updates and changes the value of the yes/no column and your solution was in my original try but powerapps wouldn't let me patch the change as it was a text value and not a boolean value

  • PA_AB Profile Picture
    17 on at

    I'm trying make the drop down display yes no OR true false because I want to patch whatever the user chooses into a yes/no column

  • zmorek Profile Picture
    3,272 on at

    Sorry, I wasn't aware that you were trying to patch things (based on the first post I assumed you were just trying to display "Yes" or "No").

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Edited:

     

    n your patch statement you can use a switch or an If statement in that specific value.

     

    So you could do this:

     

    Patch(datasource, defaults(datasource),

    {

    Somecolumn: somevalue,

    Somecolumn: somevalue,

    Somecolumn: Switch( dropdownX.Selected.Value,

                            "Yes", true,

                            "No", false,

    Somecolumn: somevalue

    })

  • PA_AB Profile Picture
    17 on at

    Patch(MMB_desks,Defaults(MMB_desks),{DeskAvailability: Switch(drpDeskAvailable.Selected.Value,"Yes", $true,"No", $false)}) 

     

    This gave me an error, I was getting a type error in the switch statement, and DeskAvailability was expecting a Boolean but I got an error instead

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I edited my reply.  Remove the $ before the True and False.

     

  • microflank Profile Picture
    2 on at
    Avoiding the Extra Switch Statement - Based on a live project am handling right now
    #set the dropdown items
    registeredDropdown.Items => Table({Id:true, Value: "Yes"},{Id: false, Value: "No"})

    Patch(DataSource,Defaults(DataSource),{Registered: registeredDropdown.Selected.Id})
    yesnodropdown-answer.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard