cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Filter on one or all status values using child gallery

Hi experts

 

I have built a time-sheet app that saves each time-sheet to a SharePoint list called TS_Master. The app has a gallery called "GalleryTS_Master"  for users to search their historical or new time-sheets using a child gallery called "GalleryStatusFilter" to control the search results based on the status values; "Submitted", "New", "Edited", or "Claimed".

 

The Items property of "GalleryStatusFilter" contains: ["Submitted", "New", "Edited", "Claimed"] but I am having trouble in allowing the user to return all states within the "GalleryTS_Master" .

Meaghan_Cohen_0-1611272150890.png

The Status value is a variable , so it is always populated with one of the above values, it is never blank.

 

The Items property of "GalleryTS_Master" contains: 

SortByColumns(Filter(TS_Master, Person.Email = CurrentUserEmail && Status.Value = GalleryStatusFilter.Selected.Value), "ID", Descending)
 
 

Annotation 2021-01-22 112532.jpg

 
 

 The "View" button allows the user to view all of the other Timesheet details in another gallery for editing purposes.

 
 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

You can add an "All" status to the child gallery and then tweak the Items property of the "GalleryTS_Master" like this: 

 

If(GalleryStatusFilter.Selected.Value = "All",
SortByColumns(Filter(TS_Master, Person.Email = CurrentUserEmail), "ID", Descending),
SortByColumns(Filter(TS_Master, Person.Email = CurrentUserEmail && Status.Value = GalleryStatusFilter.Selected.Value), "ID", Descending)
)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Super User
Super User

You can add an "All" status to the child gallery and then tweak the Items property of the "GalleryTS_Master" like this: 

 

If(GalleryStatusFilter.Selected.Value = "All",
SortByColumns(Filter(TS_Master, Person.Email = CurrentUserEmail), "ID", Descending),
SortByColumns(Filter(TS_Master, Person.Email = CurrentUserEmail && Status.Value = GalleryStatusFilter.Selected.Value), "ID", Descending)
)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Thanks @Jeff_Thorpe

 

Works like a charm! I should have mentioned I am new to Power Apps 😀

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (60,652)