Is there an option to see the path of a file in a search list

Gieselbert Kenne 5 Reputation points
2024-06-21T13:05:13.77+00:00

Is there an option to see the path of a file in a search list?

  • using standadd search field on the top of the page
  • searching form the "root" folder and finding files in many differnt subfolders
  • need to know from which subfolder each file is
  • Have seen that this was not in sharepoint 2021, so the ask to have that is around already a time
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2024-06-24T02:33:57.6433333+00:00

    Whether you use SharePoint online?

    As you said, it is by designed that users only could get file search result without specific file path in the SharePoint modern search.

    Here is a workaround, create a single line of text column and use following JSON codes to show file path.

    Select the column -> Column settings -> Format the column -> Advanced mode -> Use codes.

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "=[$FileRef]"
    }
    

    User's image

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    3 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.