cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stevenpauwels
Level: Powered On

IsFolder Condition always fails

In short, what I'm trying to do:

List files in a sharepoint folder and then perform an action for each PDF file.

 

I use the List folder action for my sharepoint folder, which should list all files in the folder.  However the subfolders also come along.

I'm trying to catch that by using the IsFolder condition setting it to: IsFolder equals false of IsFolder equals 0

However, the condition is never evaluated as being true.

 

This is weird since when I request meta data from the files, it litteraly says IsFolder false

 

ANy help would be appreciated.

8 REPLIES 8
Community Support Team
Community Support Team

Re: IsFolder Condition always fails

Hi Steven,

 

Have you tried with the "SharePoint - List root folder" action which will only list the files in the root folder?

Capture.PNG

 

Also I'm not sure about how your condition works with IsFolder. A screenshot of your detailed information of your flow would help to understand.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
stevenpauwels
Level: Powered On

Re: IsFolder Condition always fails

Dear,

 

Using the List root folder action is not the right choice since I only need files from a specific subfolder.

 

My condition is as follows:

image.png

 

I tried replacing false also with 0 and No, but none of those work.

 

Kind regards,

Steven

stevenpauwels
Level: Powered On

Re: IsFolder Condition always fails

BTW, the action fot get folder has the same statement that it gets the files from the folder, but that isn't correct since it also gives the subfolders.

image.png

stevenpauwels
Level: Powered On

Re: IsFolder Condition always fails

Is anyone able to get this IsFolder thing working?

I'd like to see this bug confirmed or get some help in the difference in setup so I might get through this 🙂

theBIMtractor
Level: Powered On

Re: IsFolder Condition always fails

@stevenpauwels I have a 'trick' with any conditional branch looking for a true/false - I enter the function equals(1,1) to represent 'true' and equals(1,0) to represent 'false'. It works every time.

Highlighted
Super User
Super User

Re: IsFolder Condition always fails

Hi @stevenpauwels

 

You need to convert the 'false' value to bool.

 

Use this in your condiction(advancedMode):

 

@equals(items('Apply_to_each')?['IsFolder'], bool('true'))

Hope this helps.


Best Regards,

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


theBIMtractor
Level: Powered On

Re: IsFolder Condition always fails

@stevenpauwels have you tried entering entering true or false directly into the function editor? The resulting function would look like 'fx true'. I understand this might also work.

JRosario
Level: Powered On

Re: IsFolder Condition always fails

 

Yippeee! I found a solution!! Read on! I was having the same problem as Steve.

 

Neither 

bool('true')

...nor entering true into the function editor made the outcome any different. Both resulted in:

 

ActionFailed. An action failed. No dependent actions succeeded.

 

HOWEVER... when I tried this in the function editor, it worked:

 

bool(0)

 

So the condition goes:

 

IsFolder is equal to bool(0)  

 

See screenshot:

2018-06-28.png

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

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 Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,390)