cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Power Participant
Power Participant

Items in choice column as selectable value in dropdown

Hi

 

Im trying to use use distinct to get the values from a SharePoint list (Choice column) and display them as selectable options in the dropdown, when i then submit the form i want the selected value to be submitted to a choice column.

 

SharePoint list CategoryData have a column named Category (Choice column)

I want to list all items in the Category column but if i do Choices(CategoryData.Category) it will only list choices i have written in the SharePoint column Category and not list the items in the list.

 

Item 1: Hello
Item 2: Hello Again

 

This is what i want to list in my dropdown, i can do it with result but then i cannot submit the form because it would be text sent to a choice column.

1 ACCEPTED SOLUTION

Accepted Solutions

@JimmyWork ,

Your drop-down Items look correct and if it is producing the desired result, then it is.

Distinct(
   CategoryData,
   Category.Value
).Result

 If you are updating to a Choice field, you should only need this in the Update of the DataCard

{Value: DataCardValue11.Selected.Result}

but I am wondering why you are bothering with a Choice field if you are putting a different list in Power App and just use a Text field- the Update would then be

DataCardValue11.Selected.Result

BTW adding further to your original post makes it less likely of a response as it is removed from the Unanswered Topics list all responders generally work through.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
JimmyWork
Power Participant
Power Participant

If i do the following under Update it works for submit form.

Dropdown items = Distinct(CategoryData,Category.Value).Result

But i wonder what is the best way to list the items in a choice column as a choices in a dropdown?
Would it be better to do a collection when the app starts, would that speed it up? And is this the correct way of doing it?

 

And is my Update part correct or I'm I missing something?

 

 

({'@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: DataCardValue11.Selected.Result})

 

 

 

Bump

The solution works but im unsure if it is the correct way of doing this.

@JimmyWork ,

Your drop-down Items look correct and if it is producing the desired result, then it is.

Distinct(
   CategoryData,
   Category.Value
).Result

 If you are updating to a Choice field, you should only need this in the Update of the DataCard

{Value: DataCardValue11.Selected.Result}

but I am wondering why you are bothering with a Choice field if you are putting a different list in Power App and just use a Text field- the Update would then be

DataCardValue11.Selected.Result

BTW adding further to your original post makes it less likely of a response as it is removed from the Unanswered Topics list all responders generally work through.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Thank you for your answer @WarrenBelz 

I'm using the choice field because that was how the SharePoint list was already setup to fetch from, but i might as well maybe clean that up and make it into Text field 🙂

 

Thank you again for the help

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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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