stringpower-automate

Power Automate Flow - 'Condition' to Check if 'Select' Action Output or Table or Excel File Contains a String


enter image description here enter image description here

I have the above flow:

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

enter image description here

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?


Solution

  • You are trying to compare an array to a number that is why you are getting an error. Instead, you should be comparing the length of the array like this:

    condition

    where the expression is:

    length(body('Filter_array_check'))