cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LIFT-TECH
Level: Power Up

Flow invalid boolean Error with Filter-Array

Hey, I'm running a scheduled flow where, if the items in a sharepoint list meet the following criteria, are filtered via the filter-array function and then inputted into an HTML Table and then that Table is emailed off. I know I could use the standard condition connector but that won't do because I need to be able to have an extract that the HTML Table can pull from. I know filter array can do this and give a me a body extract but I've never attempted to write this complicated of a step with the filter-array. Any and all help in where my formatting is incorrect would be awesome. I should note that I have very limited programming experience and I'm learning this on the fly.

 

Thanks!

 

Function: @or((equals(items('Apply_to_each')?['TransferFulfilled_x003f_'], null)), @and(equals(items('Apply_to_each')?['Status'], Approved))), @or(equals(items('Apply_to_each')?['Status'], null)), @or((equals(items('Apply_to_each')?['TransferFulfilled_x003f_'], No)), @and(equals(items('Apply_to_each')?['Status'], Approved)))

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow invalid boolean Error with Filter-Array

Hi @LIFT-TECH ,

 

I recommend that you use condition to filter items.

 

If you want to use Filter array to filter the items to create an HTML table, you also need to use expression to get the field value, there may be no way to use Dynamic content through Filter array.

41.PNG

The items directly filtered by Condition can be appended to HTML table by variables.

Configure the fields that need to be displayed in HTML table in Append to array variable action, in JSON format.

Like:

42.PNG43.PNG

This way you can use Condition to configure the filter conditions directly, without the need for complex expressions.

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.

View solution in original post

LIFT-TECH
Level: Power Up

Re: Flow invalid boolean Error with Filter-Array

Actually I did have a filter Query but primarily so I could filter by a regional field, I missed a letter which broke it. It is working now. The only other thing i had to do was change the columns (kept failing) to Custom.Upload.png

 

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Flow invalid boolean Error with Filter-Array

Hi @LIFT-TECH ,

 

Please provide the following information to help us provide the appropriate workaround.

  • The type of column that needs to be used.
  • The relationship between the screening criteria you listed is or/and.

 

I will briefly introduce how to add multiple conditions in Filter array.

For example, which field I have here is Transfer and Status, the types are Yes/No and Choice.

The condition is that the Transfer field selects Yes and the value of Status is Approved.

 

Then the expression to be configured in the Filter array is as follows.

44.PNG

The Yes/No field uses true/false to determine the field value, and the Choice type field needs to use the Choice value to determine the field value.

45.PNG

And in Filter array generally use item() to reference the field.

Hope it helps.

 

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.
LIFT-TECH
Level: Power Up

Re: Flow invalid boolean Error with Filter-Array

So I am working mainly with three main columns with these possible values:

 

Status: Approved, Denied or neither (column is blank, hence the "null")

Transfer Fulfilled: Yes, No or neither (column is blank, hence the "null" again)

 

I want to pull the list items which meet the following criteria:

1. If Status column is null (column has no value)

2. If Status equals Approved AND Transfer Fulfilled is EITHER null (column has no value, just to be clear) OR equals No

 

I have everything else figured out regarding the flow but writing this piece is proving to be difficult. Let me know if you could provide any help. Thanks!

 

Community Support Team
Community Support Team

Re: Flow invalid boolean Error with Filter-Array

Hi @LIFT-TECH ,

 

I recommend that you use condition to filter items.

 

If you want to use Filter array to filter the items to create an HTML table, you also need to use expression to get the field value, there may be no way to use Dynamic content through Filter array.

41.PNG

The items directly filtered by Condition can be appended to HTML table by variables.

Configure the fields that need to be displayed in HTML table in Append to array variable action, in JSON format.

Like:

42.PNG43.PNG

This way you can use Condition to configure the filter conditions directly, without the need for complex expressions.

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.

View solution in original post

LIFT-TECH
Level: Power Up

Re: Flow invalid boolean Error with Filter-Array

 

It seems for some reason it is skipping my condition, any idea why?Update .png

 

Community Support Team
Community Support Team

Re: Flow invalid boolean Error with Filter-Array

Hi @LIFT-TECH ,

 

Could you share all the screenshots of the Flow configuration?

Because Get items does not return any items, so the action in Apply to each is not executed.

24.PNG

Please make sure there are items in the List and don't configure any conditions in Filter Query.

 

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.
LIFT-TECH
Level: Power Up

Re: Flow invalid boolean Error with Filter-Array

Actually I did have a filter Query but primarily so I could filter by a regional field, I missed a letter which broke it. It is working now. The only other thing i had to do was change the columns (kept failing) to Custom.Upload.png

 

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (4,311)