Simple question here:
I have a Combobox that I am using to filter a GalleryGrid tied to a Sharepoint list. I am using a table formula in DefaultSelectedValues that pre-populates the values, and I have tried manually selecting the options. In both cases, no matter what order I put these values in, it only filters on the last value. Visually, I can see multiple options are selected, but it only filters the gallery on one of the values. The combobox obviously has multiple choices enabled…
SP list: 'Task Assignments'
Column: 'Leave type'
DefaultSelectedItems: Table({Value:”PTO”}, {Value:”LWOP”}) Table({Value:"PTO"}, {Value:"LWOP"},{Value:"Parental Leave"},{Value:"Bereavement"},{Value:"Military Leave"})
Items: Filter(Choices([@'Task Assignments'].'Leave Type'), Value="PTO" || Value= "LWOP"|| Value= "Military Leave" || Value= "Parental Leave" || Value= "Bereavement")
OnSelect: Filter('Task Assignments','Leave Type' in var)
I need it to filer on all of these options entered, but as you can see in the Screenshot, it only filters on whatever the last value is. I've tried a bunch of different formulas, but it always sorts on the last value
Been pulling my hair out for two months on this
Thoughts?
Hi @twain ,
Observing that you have 5 selected items in you combobox, there seems nothing wrong with the DefaultSelectedItems property.
However, the OnSelect property makes no sense to me as it will accomplish nothing.
Can you please share the Items property of your Gallery as I think the issue is in there.
Agreed, the DefaultSelectedItems seem fine
Currently the Items is:
Filter(Choices([@'Task Assignments'].'Leave Type'), Value="PTO" || Value= "LWOP"|| Value= "Military Leave" || Value= "Parental Leave" || Value= "Bereavement")
But I've also tried:
Choices([@'Task Assignments'].'Leave Type')
Filter([@'Task Assignments'].'Leave Type')
Thank you!
Hi @twain ,
You shared the Items property of the ComboBox. Can you please share the Items property of the gallery:
ah! gotcha... here it is:
HI @twain ,
So I see you are using a collection. How is that built? I assume it is done in the Onselect property of the the "View Data" button. Can you please share how you build the collections?
Right, with the Onselect property of an invisible button which patches to a Sharpoint list:
And the OnSelect of the Gallery grid is: Patch(colGridData,ThisItem,{Title: workItem.Text, Year: Caregory.SelectedItems,’Leave Type’:Progress.Selected,Hours:priority.Selected,’Starte date’: Startdate.SelecctedDate,’End date’:Duedate.SelectedDate,Employee:AssignedTo.Selected})
Hi @twain ,
Two observations:
1. In you post previous to the last I see there are now multiple leave types.
2. There is no filter for leave type in the the code you share in your last post.
Yes, this is a glitch that randomly displays other leave types, but then goes away after a few minutes or if I refresh it a couple times
So I need to put a filter in the Onselect of the ClearCol button that builds the collection? I've been trying to add a filter on the text in, but it gives me incompatibility errors with the text fields
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
56 | |
49 | |
37 | |
36 |
User | Count |
---|---|
270 | |
87 | |
80 | |
76 | |
74 |