cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Basic binding SharePoint list to drop-down

I see tons of posts on how to do cascading drop-down menus but I am not finding anything on how to create a simple drop-down menu in PowerApps from a SharePoint list. I have found it to be easy to create one from SQL Server and I assumed a SharePoint one would be easier but I was wrong.

 

I pulled my drop-down values into separate SharePoint lists so the end users could easily manage the contents of the drop-down menus. I thought the quick part would be connecting to the data sources in PowerApps and boom the drop-down menus would be done. I can tell I am truly connecting to the correct list and field as it shows up but when I try to click on the drop-down menu, instead of getting a drop-down it immediately assigns the first item in my list to the field and I cannot change it. Any Ideas as to what I am doing wrong?

 

I added the data sources for each drop-down and connected to it via the Data source. Then in Fields, I selected the correct field in the data source.

 

I think I'm missing something simple

 

Connection SettingsConnection Settings

2 ACCEPTED SOLUTIONS

Accepted Solutions
KrishnaV
Super User
Super User

Hi @Anonymous ,

 

select the dropdown control and set the items property as below:
Choices(SharePointlist.columnname) // Mention the choice column name you want to show the options you want to show as part of dropdown

distinct(Filter(SharePointlist,ID>0),Title)) // This will get all the titles as part of dropdown

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @Anonymous ,

 

try this:

Distinct(Sort(Variety,Title,Ascending),Title)

 Note: this has to be in Items property of the Dropdown List.

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

15 REPLIES 15
KrishnaV
Super User
Super User

Hi @Anonymous ,

 

select the dropdown control and set the items property as below:
Choices(SharePointlist.columnname) // Mention the choice column name you want to show the options you want to show as part of dropdown

distinct(Filter(SharePointlist,ID>0),Title)) // This will get all the titles as part of dropdown

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

mcin9781
Community Support
Community Support

Also you can check the default value,  I reproduced the scenario and didn't have a problem with the default value being blank.  Below are the properties that are set when I created the App from SharePoint for the drop down list field.  If this helps with solving your issue please mark it as a suggested answer.

SharePointDropDown.PNG

Anonymous
Not applicable

Krishna,

 

I tried the first solution:

Choices(RequestedBy.Title)

 

It showed no errors but the drop-down still did not function

 

This solution you recommended worked perfectly after I removed the extra right bracket

Distinct(Filter(RequestedBy,ID>0),Title)

 

Thanks for your awesome solution! I am sure others will fine it valuable as well. I searched for this simple solution and could not find it anywhere.

 

-Greg Guth

Anonymous
Not applicable

One quick question,

How would you sort that alpha? I know that will be the first thing that I get asked...

Does the sort go on the onSelect event or add it to this formula?

 

I tried OnSelect with little to no luck Sort( Variety, Title, SortOrder.Ascending ) It says it can't find any data

 

-Greg

Hi @Anonymous ,

 

Add it to the formula as below: 

 

 

Sort(Distinct(Filter(RequestedBy,ID>0),Title),Title,Assending)
Ex:Sort(Choices(SampleList.Status),Value,Ascending)

 

 

Items property of the dropdown, not onChange / onSelect.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Hi @Anonymous ,

 

Sorry Greg I have updated the formula so that you can use it as it is....

 

I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Anonymous
Not applicable

I am getting an empty drop-down as result using both 

Sort(Distinct(Filter(RequestedBy,ID>0),Title),Title,Assending)

or 

Sort( Variety, Title, SortOrder.Ascending )

 

Both give this result:

EmptySortResult.PNG 

Hi @Anonymous ,

 

In the below formula what RequestedBy??? is it a SharePoint list or a column?

Sort(Distinct(Filter(RequestedBy,ID>0),Title),Title,Assending)

 See this below:

Syntax:
Sort(Distinct(Filter(SharePointListName,<<condition>>),SharePOintColumn),SharePOintColumn,Assending)
ex:
Sort(Distinct(Filter(SampleList,ID>0),Title),Title,Assending)

Coming this:

Sort( Variety, Title, SortOrder.Ascending) -----> Change this to:
Sort( Variety, Title, Ascending) // I am assuming Variety is a Sharepoint list or any other Ddatasource list


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Anonymous
Not applicable

Sorry, I should have explained better. I created a bunch of lists in SharePoint for each of the dropdowns. I have a list called Departments, RequestedBy and Variety. All of them use the default "Title" field to list their fields.

I followed your example:

Syntax:
Sort(Distinct(Filter(SharePointListName,<<condition>>),SharePOintColumn),SharePOintColumn,Assending)

 Sort(Distinct(Filter(Variety,ID>0),Title),Title,Assending)

I am still getting no values in the drop-down

 

This also gave same negative results: 

Sort( Variety, Title, Ascending)

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,191)