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 the titles are not accurate, which leads to few or inaccurate search results. This issue can have two reasons:
  • 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 such documents are created in SharePoint, users often avoid filling out the title, as they are not used to doing so and it is not mandatory.
  • New files that are created inside a SharePoint library get a default title: Document, Book or Presentation, depending on file type. If the creator does not change the default title, the library will contain many documents with different content but the same, non-descriptive title.
  • When you create a new library, the title field is not visible by default. Therefore, users get no inclination that there is something wrong with the title field and they don't do anything about it.
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.



Steps to create a flow that sets title = name

  1. At https://flow.microsoft.com/, go into 'My Flows'  and click on 'Create 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 (and rename) the flow.
  11. Test the Flow by performing the trigger action: Create a new item in the task list 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.


Learn more



---------------------------------------------------------------------------------------







Always the latest news in the kalmstrom.com blog



Follow kalmstrom.com on LinkedIn Facebook, Google+  or Twitter!

back icon next icon