Creating SharePoint list view dynamically

Introduction

In this article, we explore how Microsoft has introduced an ability to create a modern view, column, filters, group by filter, and apply to the Modern list view, unlike the Classic Experience.

In SharePoint online, there are multiple modern ways to create List view and apply Scenarios, such as creating Custom modern view, columns, filters and group by filters.

Number 1

We have created a list with New Experience, then we can create new Views for the list by going to the List Settings for the specific list. Unlike the Classic Experience, to get to the List Setting you click theSharePoint Online - Create New List View Using New Modern Experience gear icon from the top menu. We will see it as an option from the drop-down.

Follow the numerical point, as shown in the below screenshot:

SharePoint Online - Create New List View Using New Modern Experience

After clicking List Settings, scroll to the bottom of the page and you will see a section named Views. This is where you can create new views for your list. Same next action same as classic SharePoint.

Number 2

We have created a list with the New Experience, then we can create new views of SharePoint lists to organize, change the column sequence and hide or show columns. One view is the default view. Additional views we add are available from the View options menu. We can create a custom view to save different sort, filter, and grouping selections you've made from the column headers or filters pane. The columns you've shown or hidden and the column widths will also be saved with the view.

For example, we look into how to create Sort, Filter, Group by Column and Change the Column position view,

Sort BY Dynamic Sorts

Select the header of a column of a list or library and select a sort. You can choose any column to sort, but only one column at a time. When you close the list or library.

  1. In SharePoint Online, select the header of a City column of a list of Information Details and select a sort. Follow the numerical point, as shown in the below screenshot.
  2. Follow the numerical point, as shown in the below screenshot:
  1. SharePoint Online - Create New List View Using New Modern Experience

Filter BY Dynamic Filters

  1. The filters pane works together with SharePoint online features we may already be familiar with like column headers and views. Depending on the column type, we may see filters to set in the column header dropdown. To open the filter pane, selectFilter by. Filters can be selected in the column header menu, also shown on the filter pane. It works the same way in reverse. Selections made on the filter pane show in the column header filter selections.

    SharePoint Online - Create New List View Using New Modern Experience

  2. Views allow you to save your filter selections. Follow the numerical point, as shown in the below screenshot,

    SharePoint Online - Create New List View Using New Modern Experience

GROUP BY the Column

  1. SharePoint online features we may already be familiar with include column headers and views. Depending on the column type, we may see Group by to set in the column header dropdown, or to open the filter pane, selectGroup by Select Column Name.
  2. Follow the numerical point, as shown in the below screenshot:

    SharePoint Online - Create New List View Using New Modern Experience

Change the Column Position(Left/Right)

  1. Depending on the column type, we may see move the column Left/Right to set in the column header dropdown. To open the filter pane, selectColumn Settings Option -> Select move Left/Right Option, then Save View as:

    SharePoint Online - Create New List View Using New Modern Experience

  2. Views allow you to save your filter selections. Follow the numerical point, as shown in the below screenshot:

    SharePoint Online - Create New List View Using New Modern Experience