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' to Check i...
Power Automate
Answered

'Condition' to Check if 'Select' Action Output or Table or Excel File Contains a String

(1) ShareShare
ReportReport
Posted on by 58
 
 

I have the above flow:

  • The 'Follow-up' condition checks if the name of the attachment contains the word 'Follow'
  • Then the flow moves to create a file from the attachment
  • Then creates a table from the Excel sheet
  • Then lists the rows of the table
  • Then selects only few columns from the table
  • Then 'Filter Array check' action looks for certain strings using expression:

or(contains(item()?['Group'], 'Service-FRA'), contains(item()?['Group'], 'Service-NLD'))

  • Then the 'Condition NLD' checks if the body output of the 'Filter array check' is greater than zero before running further actions:


    The problem with this method, it is breaking the entire flow, causing the first 'For each' action which comes before 'Get Attachment (V2)' to fail.
    If i remove 'Condition NLD' from the flow and add some action directly, the flow works fine.

    - Question: Is there any better way to create a condition that checks if a certain string exists either in the Output of the 'Select' or the output of the table or the file itself?

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
    Hi 
     
    You say it fails, but you don't show any errors etc. Your walkthrough itself sounds great and I do not see anything wrong with your logic (as you spoke it), but I cannot see any errors, or the actions code etc etc
     
    So can you please clarify what you mean by its breaks?
     
  • Verified answer
    Samwise23 Profile Picture
    58 on at
    @FLMike,
     

    The issue is that I was trying to compare an array to a number that is why the flow was failing (without any specific error message). Instead, I should be comparing the length of the array like this:

    where the expression is:

    length(body('Filter_array_check'))
    
     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard