Here's my problem: In my default page library I have added the column "Content type". This contains a selection list (manual, source code, etc.) and can be edited via drop-down menu. I have set this field as a required field. Now when I create a page (start->"New menu"->page) and open the page properties, I see that my field is a required field - there is a small asterisk after the name and it is written in red. If I do not fill this field, I can still save the page. How can I prevent this? Users are required to fill in this field, how can I ensure that?
-
1You have added modern-experience tag to your question. So just to clarify some doubts, Are you using SharePoint Online and "Site Pages" library? Are you creating a Modern Page (Site Page)? Is your "Content type" field is normal choice field? or you have added any custom content type to your library?– Ganesh Sanap - MVPCommented Feb 3, 2020 at 8:31
4 Answers
This is by design in SharePoint Online Modern experience.
The list items/library files with incomplete/missing information will be shown in separate view called Items/Files that need attention like below:
Also it will show small message of Required info in column in list view (see in above image).
Workarounds:
- Set Default value to your "Content Type" column from column settings.
- Use Approvals in SharePoint - You can approve the site pages only after all information is filled for the newly created pages.
Update:
Setting default value to column:
- Go to Site Pages --> Library settings.
- Navigate to Columns section and click on the column name "Content Type".
- Scroll down to Default Value and set one of the choices in textbox below it.
- Click OK.
Default Value Set automatically to Newly created Page:
In Site Pages Library:
-
When I configure a column with a default value, the column is not filled automatically. On the page under page properties the property is not filled. When I save the page it is not present in the column. It is empty. Commented Feb 3, 2020 at 9:04
-
How you are setting default value of the column? check updated answer for setting default value Commented Feb 3, 2020 at 10:34
-
I have set it up exactly as shown. When I create a new page and open the page properties, this value is empty and not filled with the default value. When I save / publish the page, the column remains empty. Commented Feb 3, 2020 at 10:46
-
Strange. I am doing same and it is working perfectly fine for me. Can you check the choice option is exactly same (spelling and case) as default value? Commented Feb 3, 2020 at 10:48
-
Also, are you using modern experience? what do you mean by "page properties" after opening the page? Are you talking about the "Page Details" shown on modern pages when you open the newly created page or something else? Commented Feb 3, 2020 at 10:50
Very interesting question, I don't know if there is another OOTB solution for it.
But i recommend you to work with SharePoint Approvals, don"t approve the site pages until the required information are filled.
-
If I want to allow pages to use the "request approval" function only when certain columns are filled, how do I notify the user? The user has to get a feedback if he requests approval for a page and some columns are not filled yet. I can notify him by e-mail, but is there a faster way to notify him? Commented Feb 3, 2020 at 9:11
-
You can work with Power Automate, If yes, then the answer to your question is YES, there is a faster way to notify him by using Power Automate notification actions Commented Feb 3, 2020 at 9:13
-
check this out, you can begin from the simple one docs.microsoft.com/en-us/power-automate/modern-approvals Commented Feb 3, 2020 at 9:14
I have this before and solved by:
- Create site column and make it required
- Add the site column to content type
- Add the content type to the page library
Hope this will help
This is how it is... You cant prevent users from saving/publishing pages with an empty required field. But you can vote for this feature: https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/39672985-prevent-saving-of-site-pages-if-a-required-field-i