Reputation: 177
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
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:
When an item or file is modified
Initialize variable:
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
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