I need some help trying to display a selected Item from a drop-down list. The Items were set-up in SharePoint as "Choice" Column. Is there a work around for getting "Choice" columns displayed in a gallery in PowerApps? The error message I get is "the property expects Text values, but this rule produces incompatible Record values".
Please let me know if more info/data is needed.
Solved! Go to Solution.
I just found your post as I'm having the same issue. I'm attempting to display the results of the multiple choices I have in my item list. My items have up to 5 options in a multiple choice and I'd like to see them listed in the app as I scroll through my item list, but I'm having the same error you mentioned.
In another part of my app I had to pull from info from a list and display it in a description box. The Concat function worked well for me there and I've used it to resolve this problem.
Concat(ThisItem.'Room Finishes'.Value, Concatenate(Text(Value),", "))
This is the code I used where 'Room Finishes' is the name of the column in my list. I've separated each of the 5 results by a comma and space as indicated at the end of the code by the ", "
Hopefully this resolved what you were trying to do. I'm still looking to see if I should try to separate these items with line breaks or leave them in a single line.
Hi @Anonymous,
Go back to the Sharepoint list - Settings and change the Column type from Choice to Single line of text. Don't use Choice or Lookup columns in Sharepoint if you can help it. You will save yourself hours of aggravation.
Hi @Anonymous,
Could you share more details on your app?
How did you show the selected item of a Choice column in a gallery?
According to your description, I have made the following test.
In SharePoint list, add a column of type Choice named as Status.
Add a Gallery on the app, set Items property of the Gallery as data source ListB.
Then add a Label within the Gallery and set its Text property as:
ThisItem.Status.Value
The selected item for the Choice column will be displayed as expected.
Please take it for a reference and try it on your side.
If you are still having the issue, please feel free post back with more details to help reproduce this issue.
Best regards,
Mabel
@v-yamao-msft Thanks, we have temporarily changed the column to a multi-line text column. But we really need to do a filter based on several boxes, one is a what's been selected in the drop-down boxes. All three are drop-down boxes but the last two are from Choice Columns in SharePoint.
Here are some more details.
Books = collection from SharePointListName
Books Title Drop down:
SortByColumns(Distinct(Books, BookTitles),"Result")
Old/New Drow down:
LookUp(Books,BookTitles=BookTitles_ComboBox.Selected.Result,Old_New)
Genre
LookUp(Books,BookTitles=BookTitles_ComboBox.Selected.Result,Genre)
Book Titles - Many different Book Titles
Old Titles/New Titles - Choice column between Old Titles or New Titles
Genre - Choice column of Development, Fiction, Non-Fiction
The Gallery displays based on what is selected in the filter.
Gallery Filter:
SortByColumns(
Filter(
SharePointListName,
If(
BookTitles_Var,
BookTitles = BookTitles_ComboBox.Selected.Result,
true
) && If(
OldNew_Var && Genre_Var,
First(Old_New_ComboBox.SelectedItems) in Old_New && First(Genre_ComboBox2.SelectedItems) in Genre_3,
true
)
),
"Priority_Order",
Ascending
)
The Gallery then displays based on the filter:
I just found your post as I'm having the same issue. I'm attempting to display the results of the multiple choices I have in my item list. My items have up to 5 options in a multiple choice and I'd like to see them listed in the app as I scroll through my item list, but I'm having the same error you mentioned.
In another part of my app I had to pull from info from a list and display it in a description box. The Concat function worked well for me there and I've used it to resolve this problem.
Concat(ThisItem.'Room Finishes'.Value, Concatenate(Text(Value),", "))
This is the code I used where 'Room Finishes' is the name of the column in my list. I've separated each of the 5 results by a comma and space as indicated at the end of the code by the ", "
Hopefully this resolved what you were trying to do. I'm still looking to see if I should try to separate these items with line breaks or leave them in a single line.
This is really kind of rubbish. MS should not be pushing the potential for a Choice list type if it cannot be translated into powerapps. This should be simple yet they make it so bloody difficult! Completely flies in the face of conventional UX and simplifying interfaces
Thank you, this fixed the issue for me.
Where did you put this code?
I have this and I have multi selection but the information won't show when I use the multi selection in my list
User | Count |
---|---|
174 | |
111 | |
86 | |
44 | |
42 |
User | Count |
---|---|
229 | |
118 | |
118 | |
74 | |
67 |