Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

How to get back dynamic content after ‘Filter array’ in Power Automate

Posted on January 17, 2021April 14, 2021 by Tom

“I don’t see the dynamic content output from the Power Automate ‘Filter array’ action, all I see are the values from the action before the filter was applied.”


‘Filter array’ is a Power Automate action you use if you can’t filter directly in the ‘Get…’ action. If the OData Filter query is not available or can’t be used for any reason, ‘Filter array’ is the action to use instead. But there’s a small problem with this action: it doesn’t keep the schema of the original array. It doesn’t matter how many dynamic content values the original array had, ‘Filter array’ might reduce them to two. It’ll display only ‘Body’ (the filtered array) and ‘Item’ (the objects themselves). How can you use the values from the filtered array then?

Power Automate filter array dynamic content

Add ‘Parse JSON’ to rebuild the schema

The simplest way is to add back the array schema using the ‘Parse JSON’ action. As already described in a previous post, take the ‘Filter array’ output and use it as the sample JSON payload. Power Automate will create a schema from the sample automatically. Then just input the ‘Body’ output into the action Content.

Power Automate parse json

The dynamic content will be available again as the output from the ‘Parse JSON’.

Power Automate filter array dynamic content

Summary

I consider ‘Filter array’ one of the key actions in Power Automate. I believe you should always filter instead of using conditions, but not all Power Automate actions allow you to use OData Filter query. Sometimes you must get all items and filter them later, e.g. when working with MS Teams or Planner. Or when filtering by an unsupported column in SharePoint, e.g. multiple lines of text.

But don’t let the missing dynamic content force you to replace the ‘Filter array’ with a ‘Condition’. If it’s not available, add the ‘Parse JSON’ action and create the schema again.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

3 thoughts on “How to get back dynamic content after ‘Filter array’ in Power Automate”

  1. Mohit says:
    January 14, 2022 at 9:01 pm

    Hi Team,

    In last step, dynamic content was not available as the output from the ‘Parse JSON’.

    Reply
    1. Tom says:
      January 19, 2022 at 9:53 am

      Hello Mohit,
      the output is based on the JSON schema, if the schema is defined, the dynamic content should correspond to it. Also, if you need only a specific value from the JSON, you can extract it using an expression: https://tomriha.com/how-to-get-a-specific-value-from-a-json-object-in-power-automate/

      Reply
  2. Josia says:
    January 18, 2022 at 2:17 pm

    Awesome, this helped a lot and works great! Thank you.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Format results of date calculation in SharePoint columnJune 29, 2022
  • Why is your Power Automate flow creating duplicatesJune 26, 2022
  • How to create a unique identifier in your Power Automate flowJune 22, 2022
  • How to assign custom SharePoint permission level with Power AutomateJune 19, 2022
  • Remove permissions from a specific SharePoint user with Power AutomateJune 15, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme