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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition is always tr...
Power Automate
Answered

Condition is always true after a compose

(0) ShareShare
ReportReport
Posted on by 22

Hi,

I build a flow, but my condition is always true.

I tried to say "does not contain" → e, but it always comes back true.
What am I doing wrong, because in the composition there is an e or other characters?


Thanks for looking at a solution

Samenstellen = compose
compose.jpg

 

 

 

 

 

 

 

 

Condition.jpg

Condition.jpg
compose.jpg
Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey @Bowiefan 

     

    If I understand correctly Compose gives you "Samenstellen"

     

    And you are addition a condition

     

    "Samenstellen"  does not contain "\"

     

    The above will return true because  the word Samenstellen does not contain \ character.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • Bowiefan Profile Picture
    22 on at

    Hey,
    The character \ is in the text but lower. 😉

    Compose is in dutch Samenstellen.
    So in the compose i have many text. 
    Also when I tried to say "does not contain" → e, it gaves always the result 'true'. 😞

  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at

    Hey @Bowiefan 

     

    Try - 

    CFernandes_0-1690130190197.png

     

     

    Check the output below -

     

    CFernandes_1-1690130284699.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

     

  • RMCoder Profile Picture
    219 on at

    Try using the another compose to confirm where in your outputs the character or string can be found.

     

    After Samenstellen 3, add another compose with this expression:

    indexOf(string(outputs(‘Samenstellen_3’)), ’/‘)

     

    It will tell you the position of the first occurrence of the text you are looking for (such as ‘/‘). If the text isn’t found, it returns -1.

     

    If you don’t trust the normal “does not contain”, you can put that indexOf expression in the condition and check that it is equivalent to -1.

  • Bowiefan Profile Picture
    22 on at

    Thanks CFernandes, but ik gaves an error.

    error.jpg 

  • Bowiefan Profile Picture
    22 on at

    Hello RMCoder,

    This gaves me also an error.
    compose2.jpgerror2.jpg

  • RMCoder Profile Picture
    219 on at

    Make sure the expression has the right parentheses:

    indexOf(string(outputs(‘Samenstellen_3’)), ’/‘)

     

    I edited my original response, while trying to format it on mobile I erased part of the expression.

  • Bowiefan Profile Picture
    22 on at

    Yes it is the right parentheses:

    compose2.jpg
    Look at the note

     

  • Verified answer
    Bowiefan Profile Picture
    22 on at

    I have the solution:

    Solution.jpgYes!.jpg

  • Bowiefan Profile Picture
    22 on at

    Oh no!
    Now is it always false 😞

    always false.jpgSolution.jpg

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    It's OK in value is an e 😄
    It works when I changed don't contains /

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard