Hoping this one is fairly straight forward.
I have a gallery view of a sharepoint list of tasks.
Each list item has both a status and a discipline attribute.
I want my powerapp to, by default, show a filtered view of my List, removing all status "Complete" tasks. I also want a drop down filter that my user can select a discipline.
I know how to filter a gallery view -> Filter(SPListName,Status.Value = "Assigned")
and
I know how to use a dropdown -> If(Dropdown1.Selected.Result ="All", SPListName, Filter(SPListName, Discipline.Value=Dropdown1.Selected.Result))
But I don't know how to use them together. Any help would be very welcome.
Solved! Go to Solution.
Hi @JamesP106
Please tell me if this is the logic you are after.
Filter(
SPListName,
If(
Dropdown1.Selected.Result ="All",
Status.Value <> "Assigned",
Discipline.Value=Dropdown1.Selected.Result &&
Status.Value <> "Assigned"
)
)
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.
Hi @JamesP106
Please tell me if this is the logic you are after.
Filter(
SPListName,
If(
Dropdown1.Selected.Result ="All",
Status.Value <> "Assigned",
Discipline.Value=Dropdown1.Selected.Result &&
Status.Value <> "Assigned"
)
)
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.
Hi @WarrenBelz
Thanks for your help. That didn't seem to work. I may have confused matters with my examples.
My gallery is currently subject to this filter when the Discipline drop down is selected.
If(Dropdown1.Selected.Result ="All", SPListName, Filter(SPListName, Discipline.Value=Dropdown1.Selected.Result))
But as a default I need the gallery to not include a task which has been marked at "Assigned"
Filter(SPListName,Status.Value <> "Assigned")
I need these two expression joined as one.
Solved it.
@WarrenBelz your approach was on the money just needed the "=" to be "<>" and its running perfectly.
Filter(SPListName,If(Dropdown1.Selected.Result ="All", Status.Value <> "Assigned", Discipline.Value=Dropdown1.Selected.Result && Status.Value <> "Assigned"))
Thanks for your help. If you want to modify your original post I'll mark as the solution.
Done - I was more focusing on syntax, however you have equals in your post. Never mind fixed now.
Hoping to build on the above solution.
I'd like to filter out both "Assigned" AND "Completed" tasks. I've tried a few different options but am not getting far.
Any assistance greatly appreciated.
Hi @JamesP106 ,
The below will work, but the not <> filter is not Delegable. What status values are left with these two out? I actually use the same principal on a big list, but filter on the ones I am looking for (not missing) and then it is completely Delegable.
Filter(
SPListName,
If(
Dropdown1.Selected.Result ="All",
Status.Value <> "Assigned" && Status.Value <> "Completed",
Discipline.Value=Dropdown1.Selected.Result &&
Status.Value <> "Assigned" && Status.Value <> "Completed"
)
)
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.
Thanks @WarrenBelz .
Delegable is good.
The status values remaining now would be "Open" and "On Hold".
A better approach to my problem is very welcome.
Thanks
Thanks @JamesP106 ,
All you need is
Filter(
SPListName,
If(
Dropdown1.Selected.Result ="All",
Status.Value = "Open" || Status.Value <> "On Hold",
Discipline.Value=Dropdown1.Selected.Result &&
Status.Value = "Open" || Status.Value <> "On Hold"
)
)
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.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
200 | |
179 | |
67 | |
36 | |
33 |
User | Count |
---|---|
341 | |
271 | |
113 | |
73 | |
58 |