cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LYNCHJL
Helper II
Helper II

Filter a Gallery list by Status but grouped

Hello,

 

I am trying to create a "To do list" by  filtering a gallery by "Status" field and instead of having it display all list items, I would like to just show the different statuses but grouped.  I would like to be able to click on the status and have it expand to show me all of the items and also like to have a number next to the status so the user knows how many tasks they have for each.  Below is a mock-up of what I am trying to do, but am stuck.  Thanks for the help!

 

- Enter Case into System (3)

- Review Approvals (2)

- Transmit Files to HQ (1)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

You can follow these steps:

1. On the Summary Gallery items:

GroupBy(TableName,"Status","CountStatus")
 
2.Inside the Gallery, Textbox for Status:
ThisItem.Status &" "&CountRows(CountStatus)
 
Then set a variable OnSelect of an Icon (Or Button) to
ensure you view the details:
Set(MySelectedStatus,ThisItem.Status)
 
3.To filter the Detailed Gallery, put this on the Items:
Filter(TableName,Status=MySelectedStatus)
 
See Attached Screenshot
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 


 

View solution in original post

5 REPLIES 5
eka24
Super User III
Super User III

A sample of your table with columns will help.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24.    The data is coming from a SP List. A sample is below.

 

StatusCase NumberSubmitterStart Date
Enter Case into System1John Doe7/2/2020
Approve or Disapprove2Jane Doe8/30/2020
Review Approval3Bob Smith9/1/2020
Send to HQ4Jill Johnson7/15/2020
Enter Case into System8Bob Smith7/13/2020
Review Approval6Bob Smith8/2/2020
Review Approval5Jane Doe10/1/2020

 

I'd like the gallery to display just the Statuses grouped with a number of items in each group, then allow the user to click and see the items to be able to choose/edit. 

 

To-Do-List
Enter Case into System (2)    >
Approve or Disapprove (1)    >
Review Approval (3)              >
Send to HQ (1)                      >

 

Thanks!

 

Hi @LYNCHJL ,

Do you want to have gallery1 with Status and num like your pic2, gallery2 display items based on the status that you select?

Could you tell me the fields' data type?

I assume that they are all text type.

If so, I've made a similar test for your reference:

1)gallery1's Items:

AddColumns(GroupBy(listname,"Status","Cases"),
           "Status&num",
           Concatenate(Status,"(",CountRows(Cases),")")
           )

2)gallery2's Items:

Filter(listname,Status=Gallery1.Selected.Status)

//please replace with your listaname.

 

Then gallery1 will be like your pic2, gallery2 will display Items based on the selection of gallery1.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft . 

 

Yes, I would like the first gallery to display like pic 2.  all fields are text fields.

 

I tried using the formula below in items but it does not seem to work.  Is "Cases" for my field for "Case Number"?  Also what is "Status&num"?

 

thanks

 

AddColumns(GroupBy(listname,"Status","Cases"),
           "Status&num",
           Concatenate(Status,"(",CountRows(Cases),")")
           )

   

eka24
Super User III
Super User III

You can follow these steps:

1. On the Summary Gallery items:

GroupBy(TableName,"Status","CountStatus")
 
2.Inside the Gallery, Textbox for Status:
ThisItem.Status &" "&CountRows(CountStatus)
 
Then set a variable OnSelect of an Icon (Or Button) to
ensure you view the details:
Set(MySelectedStatus,ThisItem.Status)
 
3.To filter the Detailed Gallery, put this on the Items:
Filter(TableName,Status=MySelectedStatus)
 
See Attached Screenshot
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 


 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (73,908)