web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating DropDown wi...
Power Apps
Unanswered

Populating DropDown with SPOL DD values

(0) ShareShare
ReportReport
Posted on by 25

Hi,

 

I have a SharePoint List called accounts and it has a dropdown called Cities. The sharepoint dropdown allows you to choose approx 50 cities but currently only 3 have been chosen Liverpool, Manchester Chester(multiple times). I would like my Powerapp dropdown to list the 3 cities. I would also like to add a manual entry to powerapp dropdown called "All". I can use Choices to list the 50 cities in a dropdown but as I said I only want to list the cities being used so far. If somebody decides add another entry and use, let's say,Birmingham, then this option would appear in my PowerApp dropdown as well.

 

Many thanks

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Tez ,

     

    Could you please share more details about your scenario? What is the meaning of “somebody decides add another entry and use” ?

     

    For your first question, If you want to fill the dropdown box or combo box with selected cities in that SPO list, you could apply below formula on the Items property of the control:

    Distinct(ListName,Cities.Value).Result

     

    If you want to update the selected value in the control, {Value: Dropdown1.Selected.Result} could be used in Update property of the data Card or Patch formula on a button.

     

    For the second question, do you want to make the dropdown items like below?

    Liverpool

    Manchester

    All

     

    If you do want the dropdown Items like that, and add else cities, you may create a collection to collect the results then use a Patch function to add item in to it. Apply below formula on the OnVisible of the screen, and use the collection as the Items of the dropdown box:

    ClearCollect(colCities,Distinct('Test List',City.Value).Result);
    Patch(colCities,Defaults(colCities),{Result:"All"})

     

    Then you could use another Patch formula to add else items to the collection.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Tez Profile Picture
    25 on at

    Thanks for the reply.

    This

    Distinct(ListName,Cities.Value).Result

     Works great. The drop down currently reads Liverpool, Manchester, Chester but no "All" option.

     

    So yes you're correct, I would like to patch "All" into the dropdown as well. I tried your code, it doesnt give any errors but unfortunately it doesnt work...it still just lists the 3 cities. 

  • Tez Profile Picture
    25 on at

    Ignore last post I fixed it. I never added the collection to the dropdown. Many thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard