cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shaneOZ
Level 8

Counting Rows of list if today

Hi,

 

Im trying to create a flow to count rows if the date is today, however it is how working this is my flow and below that is the test run, could someone please advise?

 

flowsss.pngflowsss2.pngflowww1.pngflowww2.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Counting Rows of list if today

Hi @shaneOZ ,

 

Could you share more details on your scenario?

 

My understanding is that you would like to get items that date is equal to Today, then update another corresponding list item with the amount of returned items from the original list.

 

In your flow configuration, in Filter query field of action Get items, please make sure the Todaysdate has the same format with current time, otherwise, you need to format the Current time so that it has the same format with Todaysdate.

 

I have made the following test for your reference.

 

The function used in the Filter Query field is:

Date1 ea 'formatDateTime(body('Current_time'),'yyyy-MM-dd')'

Function used in the Compose action is:

length(body('Get_items')?['value'])

 

Then update the returned results in another list.

1.PNG

 

Best regards,

Mabel

 

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
Dual Super User
Dual Super User

Re: Counting Rows of list if today

Hey, 

 

In the post you mentioned that you want to count for the current day so this count starts at 1 every day right? 

 

If so, in the set variable action under the for each loop, set the value of the "Current count" variable to "1" and then run the flow. You should be able to get the counts then. 

 

Edit: Please refer to the screenshot: (Setting the value everytime in the loop will not give the correct results)

SSSS.png

 

 

Thanks, 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: Counting Rows of list if today

Hi @shaneOZ ,

 

Could you share more details on your scenario?

 

My understanding is that you would like to get items that date is equal to Today, then update another corresponding list item with the amount of returned items from the original list.

 

In your flow configuration, in Filter query field of action Get items, please make sure the Todaysdate has the same format with current time, otherwise, you need to format the Current time so that it has the same format with Todaysdate.

 

I have made the following test for your reference.

 

The function used in the Filter Query field is:

Date1 ea 'formatDateTime(body('Current_time'),'yyyy-MM-dd')'

Function used in the Compose action is:

length(body('Get_items')?['value'])

 

Then update the returned results in another list.

1.PNG

 

Best regards,

Mabel

 

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

Helpful resources

Announcements
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
Users Online
Currently online: 97 members 5,223 guests
Please welcome our newest community members: