Hi All,
I'm trying to set a filter on my gallery based on the following collections.
I have the following collection written in the App OnStart function
ClearCollect(
colNew,
{
ID: 1,
Name: "All PEACE",
Logo: Icon.DetailList
},
{
ID: 2,
Name: "NEW",
Logo: Icon.Document
},
{
ID: 3,
Name: "PENDING",
Logo: Icon.Tools
},
{
ID: 4,
Name: "IMPLEMENTED",
Logo: Icon.Manufacture
}
,
{
ID: 5,
Name: "OVERDUE",
Logo: Icon.Warning
}
,
{
ID: 6,
Name: "DECLINED",
Logo: Icon.Blocked
}
);
My Sharepoint List STATUS col is a choice column.
Choice are
1. NEW
2. PENDING
3. IMPLEMENTED
4. OVERDUE
5.DECLINED
As you can see the choice of my Sharepoint list is the same as the colNew Name.
I'm trying to filter the gallery based on the above but i'm unable to find the correct filter.
Please refer to the appscreen below for the expected filtering behavour from my gallery.
I had to use multiple gallery to get the below result.
I'm pretty sure there should be an easier way to do the filtering.
Please do let know where I went wrong.
Thank you.
Solved! Go to Solution.
@ViswaDevanNair When you say, Status.Value=colNew.Name you are not referring to one value. colNew is a collection with 5 records. That's why you are getting the error.
From your screen shot, I believe colNew should be the Items for the left gallery. In that case, your formula will be,
Status.Value=leftGallery.Selected.Name
Also, note that you are missing a close bracket in the end.
Hi CNT,
Thank you.
It works now. and yes I was referencing the filter selection to the left gallery.
The following is the revised filter for the items property.
Glad it help!
Please remember to give a 👍 and accept my solution as it will help others in the future.
I would create a new collection for each filter condition. You could add a combo box with your filter conditions. then use the OnChange of the comboBox to re-create a new collection with the selected filter applied.
off the top of my head....
ClearCollect(
colFiltered,
Filter( colNew,
Name=comboFilter.Selected.Value
)
)
@ViswaDevanNair When you say, Status.Value=colNew.Name you are not referring to one value. colNew is a collection with 5 records. That's why you are getting the error.
From your screen shot, I believe colNew should be the Items for the left gallery. In that case, your formula will be,
Status.Value=leftGallery.Selected.Name
Also, note that you are missing a close bracket in the end.
Hi CNT,
Thank you.
It works now. and yes I was referencing the filter selection to the left gallery.
The following is the revised filter for the items property.
HI Daved1.
Thank you for the suggestion.
I'm avoiding the use of a combo box as it doesn't suit my overall app design.
Thank you.
Glad it help!
Please remember to give a 👍 and accept my solution as it will help others in the future.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
203 | |
106 | |
56 | |
51 | |
41 |
User | Count |
---|---|
272 | |
156 | |
85 | |
81 | |
56 |