While creating a Power Virtual agent that sends a search keyword as input to a Power Automate while invoking it, the flow was erroring out resulting in an error being shown back in PVA as:
To check the error, we jumped into the power automate and the error listed there was “The LinkFileName” of type computed cannot be used in the query filter expression.
So basically, we were using the Search Keyword input from the PVA chat window and using it as a filter query to see a document existing by that name in SharePoint using the Get Files action. However, the error thrown clearly states that we cannot use LinkFileName in the filter query as it’s a non-Filterable metadata field.
After a bit of research, I was able to find that we still have an option to use another filterable field that holds the document name metadata which is FileRef . So instead of LinkFileName, we replaced it with FileRef in the filter query and the error went away.
We did a search using the keyword October and the PVA has transferred this input to the Power automate which has used the Get Files action to filter the specific file name using the revised filter query and we have the result shown back in the PVA chat window
Thus, we saw how we can use the FileRef field instead of LinkFileName to filter the document library by the document file name and this comes in handy when you need to search for a specific document in the library