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

How to Create a View in a document library When a new Page is added to the Site Pages Library

I am working on a site design that uses individual pages for projects. Each page will have a specific project number in the name that I would like to use to create a view in several document libraries on the site so that the page will be able to display the documents related to that project.  Any thoughts?

Super User
Super User

@jrtraylor You can simply add a lookup column in each view. This is simple ask, you should not make it complicated according to me.


Lookup to Site Pages library and title column(which has some code in your case)



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.

@jinivthakkar, thanks for the response. However what i am looking for is a flow to create views automatically when the New Page is created. We will have a large number of sites based on our list of customers which can have a large number of projects for each customer. I was going to set the customer sites up as Hubs and then have Project Sites Created and associated to the customer then i would not need to worry about associating documents to projects since the Project site would be dedicated to the Project. Sadly I was asked to keep the number of sites down and to use just a customer site to organize things by project and the amount of work required to create new projects to a minimum.  I came up with the idea to use Pages instead of sites and using a Grouped View based on the Project # column is unacceptable, they want to only see documents and SharePoint List entries related to the project of the page they are currently on. We will have about 15-20 libraries per project So if I could automate the view creation in the libraries based on when the Project Page is created it will speed things up a lot. I will still need to have the pages updated manually to point to the correct view but a lot of work will be cut out if the view is created automatically.

@jrtraylor just check this link, it has details how you create a column and add it to view.


Hope this helps !! 


@jinivthakkar - Again thanks but I am not trying to create a column with Power Automate although it is nice to have some information on how to do it if I ever need to. I want to make a view in different libraries when a new page is added to the library. I want the view to have the same name as the page that was created and only show the documents in the libraries that have the page title in a Project # column. The documents will be added to the libraries and a Project # will be added for filtering in the different views. 

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,042)