web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Power Automate - Conditional contains

(0) ShareShare
ReportReport
Posted on by 12

Hi Community,

 

I wondering if you can help with the following flow: I`m trying to trigger an approval flow when a file is created or modified on a SharePoint folder. I added a condition to identified if the file name contains certain information but the output of this condition is always false even though i am adding the correct information in the file name. I would like to know how i should do it in order the condition identify the file name.

 

 
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at
    Re: Power Automate - Conditional contains

    @nnvm 

    Hey there.  Can you show us a pic of the condition? Maybe the input (filename) as well?  It might be something as simple as quotes or something, but would like to see what you have first.

     

    Thanks!

    -Ed  

  • nnvm Profile Picture
    12 on at
    Re: Power Automate - Conditional contains

    Sure, here you have.

     

    flow.pngfile name.png

  • RobElliott Profile Picture
    10,286 Super User 2025 Season 2 on at
    Re: Power Automate - Conditional contains

    @nnvm at the risk of stepping on @edgonzales' answer, the text in the condition is case sensitive so it is looking for LAX whereas your file has Lax.

    Rob
    Los Gallardos

  • ScottShearer Profile Picture
    25,254 Most Valuable Professional on at
    Re: Power Automate - Conditional contains

    @nnvm 

    I believe thie issue is that string comparisons are case sensitive.  Try wrapping the left side of your conditions in an toUpper() expression which will convert the string to upper case.

    image.png

     

  • nnvm Profile Picture
    12 on at
    Re: Power Automate - Conditional contains

    Thanks for your solution but it did not work. 😔

     

    The following error appeared: Unable to process template language expressions for action 'Condition' at line '1' and column '2664': 'The template language function 'toUpper' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#toUpper for usage details.'

     

    I also tried modifying the original flow From LAX to Lax in order to match the file name but it is still bringing as result false.

      

     

  • ScottShearer Profile Picture
    25,254 Most Valuable Professional on at
    Re: Power Automate - Conditional contains

    @nnvm 

    Try wrapping the expression that you have in a coalesce() expression which will provide a default value if your first value is null:'

    coalesce(toUpper(triggerBody()?['{FilenameWithExtension}']),'NoValue')
     
     
  • nnvm Profile Picture
    12 on at
    Re: Power Automate - Conditional contains

    Unfortunately it did not work either. I continue getting the same message

     

    Unable to process template language expressions for action 'Condition' at line '1' and column '2664': 'The template language function 'toUpper' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#toUpper for usage details.'.

  • ScottShearer Profile Picture
    25,254 Most Valuable Professional on at
    Re: Power Automate - Conditional contains

    @nnvm 

    Sorry about that....

    What I should have posted is this:

    toUpper(coalesce(triggerBody()?['{FilenameWithExtension}'],'No Value'))
    The concept is that the text No Value will be returned if the file name is null.
  • Gus Profile Picture
    136 on at
    Re: Power Automate - Conditional contains

    case sensitive test fixed my issue. ty

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard