substringof not fetching information

Serhat 0 Reputation points
2023-02-13T12:41:56.9166667+00:00

Dear experts,

Im combining a library and list to lookup information. In this case i use powerautomate to specifically fetch an email from a list with a column named "FileName" that has to match or contain the name of the file in the library.

First using the following expression:

FileName eq '@{triggerOutputs()?['body/{Name}']}'

This worked perfectly. After i uploaded a file (to the library) it got triggered, and fetched the email addres that belonged to the file in a list.

Now i know that titles can have misspelling or additional information, so i wanted a system that looks for a contain filter instead of an EQ expression/filter. So that "ABC 123" still gets matched with ABC even though it has the 123 added.

I use the following expression:

substringof('HereIPutTheDynamicContentOftheFileName', FileName)

(FileName = Name of the Column to search in)

However with this expression it doesn't fetch anything at all. Could someone tell me what i'm doing wrong or any alternative?

Kind regards SK

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
{count} votes

3 answers

Sort by: Most helpful
  1. Serhat 0 Reputation points
    2023-02-13T13:16:15.86+00:00

    Solved it,

    Use a filter array and the following expression: @contains(triggerOutputs()?['body/{Name}'], item()?['FileName'])

    0 comments No comments

  2. Serhat 0 Reputation points
    2023-02-13T13:16:43.33+00:00

    Solved it:

    @contains(triggerOutputs()?['body/{Name}'], item()?['FileName'])

    0 comments No comments

  3. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-02-14T02:12:03.0233333+00:00

    Hi @Serhat ,

    I'm glad to hear you solve the problem ,if you have any issue about SharePoint, you are welcome to raise a ticket in this forum.

    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others." and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    substringof not fetching information

    Issue Symptom:

    add substringof('HereIPutTheDynamicContentOftheFileName', FileName) and powerautomate return nothing.

    Current status:

    Use a filter array and the following expression: @contains(triggerOutputs()?['body/{Name}'], item()?['FileName']) fixed the issue.


    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!


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.