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 / Defaulting Dropdown
Power Apps
Unanswered

Defaulting Dropdown

(0) ShareShare
ReportReport
Posted on by 42

I have a multiselect combobox that allows a user to select multiple countries.  I have a hidden field in the form that is "country of concern" that is a dropdown of "yes" or "no."  What I'd like to do is default the countryofconcern dropdown if a value selected in the combobox is one of 36 countries appearing in another datasource.  For example, if the user selects "Yemen" and "Costa Rica", I'd like the countryofconcern dropdown to automatically default to "yes."  I'm also fine with hardcoding the value into the defaultselecteditems property of the countryofconcern dropdown, but every formula I use throws an error and won't work.  Any ideas?

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Friscosammy 

     

    You can achieve this by using the in operator.

     

    If(
    CountRows(
    Filter(
    ComboBox1.SelectedItems,
    Value in DataSourceOf36Countries
    )
    ) > 0,
    "yes",
    "no"
    )

     

    If(
    CountRows(
    Filter(
    YourCountryComboBox.SelectedItems,
    CountryColumnName in ["Yemen", "Costa Rica", ...] // List all 36 countries
    )
    ) > 0,
    "Yes",
    "No"

     

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Friscosammy Profile Picture
    42 on at
    Thanks Rajkuma, However, I tried 

    If(
    CountRows(
    Filter(
    Datacardvalue28.SelectedItems,
    ;Travel Location(s)' in ["Yemen", "Iran"])
    ) > 0,
    "Yes",
    "No"


    I got red lines and errors.

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