thb
thb

Reputation: 177

Sharepoint Library "Name" column not visible in calculated-column dropdown list

In Modern Sharepoint I created a Document Library by New>Document Library and then uploading *.png files. They are stored in a Column Name called Name (linked to document with edit menu). This can be seen in Settings>Edit View

Now I want to create a Calculated Column to calculate the last character before the .png in the filename which are in the Name Column. I go to Add Column > More > Create Column and define Column Name and Type.

Then defining the formula but the Name column does not appear in the drop down list.

Any suggestions ? thx

Upvotes: 1

Views: 3306

Answers (2)

Yasin Amini
Yasin Amini

Reputation: 255

The "Name" field is not visible and is currently unsupported at the time of writing this response. However, a workaround can be implemented using Power Automate.

Follow these steps:

  1. Ensure you have a Microsoft 365 account with a valid Power Automate license.
  2. Create a new flow with the following three actions:
  • When an item or file is modified

  • Initialize variable:

    • Name: Title
    • Type: String
    • Value: "Extract the name from the provided properties"
  • Update File Properties activity and use the initialized variable to assign or calculate the new column. For example, to extract the portion of the string before the first space, you can use the following expression:

first(split(variables('Title'), ' '))

Upvotes: 0

Michael Han
Michael Han

Reputation: 3655

It's known case. We cannot use filename in calculated field. You could vote here: https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/36029680-use-filename-in-calculated-field

As a workaround, you could use workflow /flow to make the Title field gets the filename. Then use title field in the calculated column.

Upvotes: 0

Related Questions