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 / Adding an 'NA' option ...
Power Apps
Answered

Adding an 'NA' option to a comboBox along with the original data

(0) ShareShare
ReportReport
Posted on by 13

Lets Say I have a datasource with all the countries and their corresponding states/proveniences and the states has been populated in my combobox like the following

Distinct(Filter(tbl_Country, 'Country' = First(cb_Country.SelectedItems).Result),'StateName')
- the filter is there because the user can choose a country which filters a states combobox

Now I have a requirement to add an "NA" option to my comboBox but I cant change the underlying data. Meaning I cant go to datasource and add NA manually to the table. How can I add the 'NA' option along with the rest of the data to my combo box. Secondly Can I have the NA option appear first?

Categories:
  • LRVinNC Profile Picture
    2,297 on at

    In similar circumstances, I have loaded the values for my combobox to a collection, then patched the collection to add the N/A value, using a leading space so it sorted to the top of the list, and then used that collection instead of the original table.  

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    in this video @RandyHayes shows you how to add a "All" option to a dropdown. Same basic idea can help you add any other option you want, and set it's behavior.

     

    https://www.youtube.com/watch?v=nlfZD6lsCDc 

  • Verified answer
    Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Put this code on Start of the App

    ClearCollect(
     CollCountry,
     {Result: "NA"}
    );
    Collect(
     CollCountry,
     Distinct(Filter(tbl_Country, 'Country' = First(cb_Country.SelectedItems).Result),'StateName')
    )

     

    And on the Items property of the DropDown put CollCountry

     

    I made a test case and this should work 🙂

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard