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

15 REPLIES 15

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
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

Anonymous
Not applicable

That is it! Excellent solution!

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

I see so many try to figure this out and very few solutions anywhere. This should help a lot of people.

 

Thank you very much!

 

-Greg Guth

Anonymous
Not applicable

I am going to add this to the same thread because it is still related to this solution. I put in the sweet code you set me up with and test the form. The drop-downs are awesome, all coming from their external SharePoint lists and displaying the results in alphabetical order. The insane thing is as soon as I submit the form everywhere I used this drop-down solution the first value on every drop-down is submitted even though the user clearly selected another.

 

Any ideas?

 

If any other user follows this thread they will have the same issue so I think we should continue on here.

Hi @Anonymous ,

 

May I know what is the code you are using to submit? and what is the field in the sharepoint list you are setting?
for Setting dropdown value to single line of text:

Patch(SPListName,Defaults(SPListName),{fieldName:dropdownCntrl.Selected.Value})

for setting dropdown value to a choice field:

Patch(SPListName,Defaults(SPListName),{Title:"Sample",choiceFieldNAme:{Value:dropdownControl.Selected.Value}})


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
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 doing a basic "Submit(form)"

 

My actual code is this:

Set(var,"SubmittedQC");SubmitForm(SharePointFormInput);

 

I am passing a variable on the status of the approval process of the form.

 

My form OnSuccess looks like this:

Navigate(ReviewScreenInitiated, ScreenTransition.Fade);QC_Submit.Run(var,Last(ItemMaster).ID,var)

 

I simply navigate to the next review screen and call a Power Automate script to do an Email notification.

 

My Items field looks like what you suggested yesterday:

Distinct(Sort(RequestedBy,Title,Ascending),Title)

 

If you need anything else, let me know.

Hi @Anonymous ,

 

let me ask you one thing, you are showing the dropdown values from various lists on the form are they mapped as lookup columns in the list where you are submitting the data?

 

Could you please also provide me the insight of the SharePoint list structures.


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
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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (36,635)