Forum Discussion
Working with the file name
- Apr 23, 2021
It's a known limitation of SharePoint. We cannot use file name in calculated column formula.
There is a SharePoint UserVoice for this. You can vote here: Use filename in calculated field
Workaround:
Create a new text field & populate its value using workflow on item creation/update. Hide this field from property forms.
Use workflow to updated the Title field based on the filename. Then use Title field in the calculated column formula.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
LesCast11 If you are using SharePoint online, you can use Power automate flow to update the column in library based on file name.
You can configure your flow something like this:
ID and Name in second action are dynamic data from first trigger in flow.
Please consider giving a Like if my post helped you in any way.
- drmrbrewerSep 29, 2023Copper Contributor
ganeshsanap I get a warning about creating an infinite loop (because updating Title will trigger the action again). What is the best way to avoid this? Ideally, the action should not trigger at all the second time (via a trigger condition), rather than triggering and then aborting.
- LesCast11Aug 08, 2022Copper ContributorMany thanks! This really help me!!