cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ms1994
Frequent Visitor

Flow to count the amount of times a certain value is submitted

Hi there,

 

My flow so far is as follows:

 

Created Form from Excel Online

 

Once it's filled in, it will send out a notification via email with all the details needed.

 

I need to add an operation where it will count the number of times the input has been added.

 

e.g.image.png

 

 

 

 

 

Each time 'Mike' is entered, the value on the right column will increase by 1. 

 

At the moment I can't do this as Excel doesn't allow formulas with Flow. 

 

Is there a way I can do this with Data Operations?

 

FlowFlow

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @ms1994 ,

 

You could refer to the following method to configure Flow.

 

  • Use Filter Query to filter out rows with the same name in the table.
  • Configure length() function to get the number of rows. If it is less than 0, the count is 1.
  • If the result is greater than 0, count is incremented by one on the number of rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])
add(length(body('List_rows_present_in_a_table')?['value']),1)

Image reference:

23.PNG24.PNG

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.

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @ms1994 

 

Please see the screenshots below:j1.PNG

 

J2.PNG

 

I initialised an empty integer variable and set that to the value from the get row action (I used the expression because the value in my excel is stored as text)

 

int(body('Get_a_row')?['Column2'])

Then I am incrementing that value by 1 and updating teh row. I am identifying the row by the response from the form. 

 

Hope this Helps!

 

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!

v-bacao-msft
Community Support
Community Support

Hi @ms1994 ,

 

You could refer to the following method to configure Flow.

 

  • Use Filter Query to filter out rows with the same name in the table.
  • Configure length() function to get the number of rows. If it is less than 0, the count is 1.
  • If the result is greater than 0, count is incremented by one on the number of rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])
add(length(body('List_rows_present_in_a_table')?['value']),1)

Image reference:

23.PNG24.PNG

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.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,193)