Set Document Titles to the Same as the Name

A SharePoint Flows tutorial by Peter Kalmström

Flow iconThe SharePoint Search displays title hits on top, so for the search to work well it is important that title columns in lists and libraries are filled out with terms that give relevant information.

However, for many organizations it is a problem that library titles are not accurate, which leads to few or inaccurate search results. This issue can have several reasons:
  • It is not mandatory to fill out the title field in SharePoint document libraries.
  • The title field does not have the same importance in a file system as it has in SharePoint, so files that are imported into SharePoint libraries will often lack titles or have irrelevant titles. 
  • When you create a new library, the title field is not visible by default.
In the demo below Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, shows how to create a flow that sets the title to the same as the name of the file. The name is hopefully relevant, so this flow solves the problems with non-existing as well as irrelevant titles.

Note that files created inside a SharePoint library get a default name: Document, Book or Presentation, depending on file type. If the creators do not change the default names, the library will contain many documents with different content but the same, non-descriptive names. Then this flow will not help, as the titles will be as useless as the names.

The flow in the demo works well when files are uploaded to the library. When they are created in SharePoint, we should give the author time to give the file a proper name, by adding a Delay action after the trigger. This is described in detail in the book, SharePoint Flows from Scratch.



Steps to create a flow that sets title = name

  1. Create an automated flow from blank.
  2. Select the trigger 'SharePoint, When an item is created or modified'.
  3. Select the SharePoint site URL, or enter the URL as a custom value.
  4. Enter the SharePoint library name as a custom value.
  5. Click on 'New step' and then 'New action'.
  6. Select the SharePoint action 'Get file properties'.
  7. Select the site and library again and the dynamic content ID.
  8. Click on 'New step' and then 'New action' and select the SharePoint action 'Update item'.
  9. Select the site and library again and the dynamic content ID. At 'Title', add the dynamic content 'Name'.
  10. Save the flow.
  11. Test the Flow by performing the trigger action: Create a new file in the document library and make sure that it gets a title that is the same as the name.


To update the titles of the existing files, give them all the same dummy title in edit mode. Now they are modified, and the flow will run and change the dummy titles to the same as the file names.



back icon next icon
Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved