cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

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
Highlighted
Community Support
Community Support

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

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!

Highlighted
Community Support
Community Support

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,472)