cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimmyWork
Super User
Super User

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

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.

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

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,609)