cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lucasiragusa
Level: Power Up

Use output of multiple condition in subsequent steps

Hi Community! 

I am building a flow where I trigger an action based on the condition that at least one of a series of keywords is present in the body of an email.

 

My condition has multiple rows, and in the step following the evaluation of the condition I would like to index the position in the email body of the string that has been found. 

 

When I test the flow and look at the output of the condition, the only result i see is "true", rergardless of which keyword was successfully matched. 

 

Is it possible to use the output of the condition evaluation in following steps, or alternatively are you aware a more efficient way to obtain this result?

Thanks in advance for your help, 

Luca 

Flow capture.JPGFlow capture.JPG

1 REPLY 1
Community Support Team
Community Support Team

Re: Use output of multiple condition in subsequent steps

Hi @lucasiragusa ,

 

Basically, Condition has no actual output, it is only used as a logical judgment, so the return value is only true or false.

You could try to use other actions to create the same logical, and also could get the corresponding matched keyword.

 

  • We need to initialize two array variables in advance, divide all the keywords into two groups, and store them in the array variable in the JSON object format.
  • Then use Filter array to filter out the keywords contained in Compose.
  • Then use the length() function to determine if there are any elements in the Body of the Filter array.
  • Finally, you could get the corresponding keyword using variables('VariableName')['index']['KeyWord'].
  • You could also use Apply to each to traverse the Body of the Filter array.

Image reference:8.PNG

9.PNG

10.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (7,464)