Forum Discussion
SharePoint List - Group items and leave one category open
- Aug 07, 2023
JFM_12 The accordian web part is not one of the ones available on a modern page. But you can still achieve what you want via a different method.:
- Make sure you have 3 views of your list filtered for Successful, Warning and Error.
- Then create a page and add 3 one-column sections.
- Add a list web part into each section, select your list then select the view to display.
- Edit each section and select "Make this section collapsible" and select the default display, so Successful and Warning are collapsed by default and Error is exapnded.
And this is the result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
Yes but this will collapse the category "Status" with all the 3 settings.
But the goal is to have one setting to be expanded within this category.
- successfull should be collapsed
- warning should be collapsed
- error should be expanded
Regards
JFM_12
Here's how you can do it:
Create your SharePoint list:
Go to your SharePoint site.
Click on "Site Contents" and then "New" to create a new list.
Enter the necessary columns and data for your list items.
Create a new page:
Click on "Site Pages" or the appropriate location where you want to add the new page.
Create a new page and give it an appropriate name.
Add the "Accordion" web part:
Edit the newly created page.
Click on the "+" icon to add a new web part.
Search for "Accordion" in the web part search bar.
Add the "Accordion" web part to the page.
Configure the "Accordion" web part:
Edit the web part and configure its settings.
For each accordion item, use the "Group By" value as the header and create a list view with the appropriate filter for that specific group.
Set the "Status" column as the grouping criterion, and in the filter section, specify "Status" equals "Error" for the item you want to be expanded.
Save and publish the page:
Save the changes to the page and publish it.
Now, when users visit the page, they will see the SharePoint list data displayed in an accordion format, with the "Error" group expanded, and the "Warning" and "Successful" groups collapsed by default.
Using the "Accordion" web part is a non-programmatic approach to achieve the desired result and doesn't require custom coding. It provides a user-friendly way to display the list data with the specific grouping and expanding behavior you mentioned.
- JFM_12Aug 07, 2023Iron ContributorHello Lalit
Thank you again for your great answer.
Accordion is not available on SharePoint Online Modern Site, or am I wrong?
Thank you
Regards
JFM_12- Rob_ElliottAug 07, 2023Silver Contributor
JFM_12 The accordian web part is not one of the ones available on a modern page. But you can still achieve what you want via a different method.:
- Make sure you have 3 views of your list filtered for Successful, Warning and Error.
- Then create a page and add 3 one-column sections.
- Add a list web part into each section, select your list then select the view to display.
- Edit each section and select "Make this section collapsible" and select the default display, so Successful and Warning are collapsed by default and Error is exapnded.
And this is the result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)- JFM_12Aug 07, 2023Iron Contributor
Hi Rob
Thank you very much for your reply.
What a pitty that the above mentioned webpart does not exist in SharePoint Online
Thought that One View would be enough and within it could be configured.
Regards
JFM_12