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

Community site session details

Session Id : sQjCwd5vzaQFzE+EEHAdt9
Power Automate - Using Flows
Unanswered

Applying filter to For each flow

Like (0) ShareShare
ReportReport
Posted on 26 Feb 2024 14:38:54 by 2,245

Here is my flow

 

1)when a file is created(properties only)

2)Get files (properties only)

3) For each

    i)get file content // identifier from get files(properties only)

    ii)Compose //name from get files(properties only)

iii)create file //In destination document library

 

 

I am able to copy documents from source document library to target document library but im unaware how to filter specific files from source document library as per above flow steps

 

Source document library

Title

Location.txt

Locations001.txt

supply.txt

 

Expected Output :

Target document library

Title

Location.txt

Locations001.txt

 

 

  • Veblitz Profile Picture
    2,245 on 27 Feb 2024 at 15:16:40
    Re: Applying filter to For each flow

    Hi,

     

    I am not getting same error also i used same dynamic content as you share,still not working

  • v-mengmli-msft Profile Picture
    on 27 Feb 2024 at 06:14:18
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    'outputs('Get_files_(properties_only)')' returns an object. This is why filter array shows 'From property value in the query action inputs is of type object .The value must be an array'.

     

    You should keep the previous dynamic content.

    outputs('Get_files_(properties_only)')?['body/value']

     

    Did the below error appear when you use same dynamic content as my? If so, could you please show some screenshots about it and details of actions?

    vmengmlimsft_0-1709014380378.png

     

    Best regards,

    Rimmon

  • Veblitz Profile Picture
    2,245 on 26 Feb 2024 at 17:31:55
    Re: Applying filter to For each flow

    I tried using your screenshot for dynamic content in filter array

    outputs('Get_files_(properties_only)')?['body/value']

     

    Also ,now im using below one in my flow for filter array

    outputs('Get_files_(properties_only)')

  • v-mengmli-msft Profile Picture
    on 26 Feb 2024 at 16:52:54
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    Are you using same dynamic content as my screenshot?

    If no, what is the value in the From field of Filter array?

     

    Best regards,

    Rimmon

  • Veblitz Profile Picture
    2,245 on 26 Feb 2024 at 16:24:00
    Re: Applying filter to For each flow

    im getting error in filter array steps.

  • Veblitz Profile Picture
    2,245 on 26 Feb 2024 at 16:16:40
    Re: Applying filter to For each flow

    Further im getting below error after updating your recent inputs.

    Error details:

    From property value in the query action inputs is of type object .The value must be an array.

  • v-mengmli-msft Profile Picture
    on 26 Feb 2024 at 15:53:52
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    Do you want to create files according to filtered out files?

    If so, you should use body of Filter array in apply to each and use expression to get file identifier.

    vmengmlimsft_0-1708962775849.png

     

    In addition, could you please show some screenshots about your failed steps?

     

     

    Best regards,

    Rimmon

     

  • Veblitz Profile Picture
    2,245 on 26 Feb 2024 at 15:40:34
    Re: Applying filter to For each flow

    Flow is getting failed.No dependents actions succeded

  • Veblitz Profile Picture
    2,245 on 26 Feb 2024 at 15:27:56
    Re: Applying filter to For each flow

    Thanks for your help.

     

    should we need to add the filter array step inside for loop and remove compose step as per below steps:

     

    1)when a file is created(properties only)

    2)Get files (properties only)

    3) For each

        i)get file content // identifier from get files(properties only)

        ii)Compose //name from get files(properties only) ? do we need to remove this and add filter array as you shared ?

    iii)create file //In destination document library

  • v-mengmli-msft Profile Picture
    on 26 Feb 2024 at 14:54:17
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    I recommend you use filter array to get expected files.

    Take your assumption as an example, I just want to get:

    Location.txt

    Locations001.txt

    vmengmlimsft_0-1708959224437.png

     

     

    Best regards,

    Rimmon

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow