cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Polly
Frequent Visitor

Condition after Get Files (Properties only) is acting very strange.

I have the following data file.

Polly_0-1647130211412.png

The objective is to check a folder to see if there is a file exists ie. Polly.pdf.

If the file is not there - then the flow is to generate a pdf (I need to ensure I only create the file once .. ever)

I have put a Post message in chat so that I can follow which route the flow in going in.  

What I cant understand is that its is doing some of Condition = True and Some of Condition = false.

 

Can anyone clarify

Here is my flow

Get files (with filter on filename.pdf)

Condition = length(outputs('Get_files_(properties_only)')?['body/value'])  <> 0

If True (ie file exists) - Post a message = File found - take no action

If false - Post a message - File not found - Generate the pdf.

 

Polly_2-1647130533782.png

 

Polly_1-1647130499292.png

 

The folder is empty at first so the first run through Get file will be 0

Polly1 returns - Polly1 not found & file is generate

Polly2 returns - Polly 2 found and still generates the files (note Polly2 isnt in the folder)

Polly3 returns - Polly 2 found and still generates the files (note Polly2 isnt in the folder)

and so on as shown below.

Polly_3-1647130909245.png

 

But it still creates the files 

Polly_4-1647130946077.png

 

 

How can it does a bit of one condition and a bit of the other.

 

Im very new to Power Automate so not sure what is going on.  There is no Generate file If the file has been found.

 

DO i need to clear length(outputs('Get_files_(properties_only)')? or something like that before it loops round again?  Im guessing now!  

Would appreciate any help

 

 

0 REPLIES 0

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,292)