cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leyburn19
Level 10

Counting records

I have a get items flow based on a filter. I use @lenght() to return the total records

 

I wanted  a similar filter based on a yes/no (bool) column but see this is not supported in the filter options for get items so I cannot get the total records count I want. 

 

I can do a condition on the filter that based on the Yes/No and it will loop through the rows of the Get Items result.

 

Is there a way I count count the yes loop and get the total this way.  I have tried using variables,  but note that each time it goes through the loop it just resets the variable and does not add.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Counting records

Hi @leyburn19,

 

Do you want to filter items based on Yes/No column using Filter query then return the total records?

I have made a simple test using the following code in the Filter query field:

1.PNG

However, it seems that it will return all the items of value “No” but not “Yes”.

If you are having the same issue on your side, please feel free post back.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Counting records

Hi @leyburn19,

 

Do you want to filter items based on Yes/No column using Filter query then return the total records?

I have made a simple test using the following code in the Filter query field:

1.PNG

However, it seems that it will return all the items of value “No” but not “Yes”.

If you are having the same issue on your side, please feel free post back.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
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

leyburn19
Level 10

Re: Counting records

I think my issue was also getting corrupted by selecting the wrong column.  I wanted to count records with an attachment so was choosing {HasAttachments}.   I changed this to be Attachments and got the result I required. 

 

Two interesting thoughts. 1

1.  Why Attachments when HasAttachments is a boolean? Attachments does not appear as a selection yet HasAttachments does.

2. The result alos seems to be reversed to logic.  True returns all those without attachment and False returns those with.

 

One of those quirks I suppose

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 Kudoed Authors (Last 30 Days)
Users online (3,134)