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

Count based on phrase in a sharepoint list and recurrence email

Hi All

I'm new to Flow and finally realised that 'Flow is the way to go!'

I have just started in the world of Powerapps and have developed and app with a Sharepoint List which works great but i have been asked for a quarterly email providing the number of requests based on a keyword which needs to send every yearly quarter.

Any help would be appreciated

GaryRobot Happy

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Count based on phrase in a sharepoint list and recurrence email

@gazzo1967 ,

This one was fun, thanks for bringing it up.  My usual caveat is that this may not be the most elegant solution, but it uses the things I (mostly) know how to do.

 

  • I started with a recurrence trigger to run every quarter, but you can change that to whatever you want.
  • Then, I initialized a variable "KeywordCount" and set it as an integer, with a default value of 0.
  • Then, get the items in your SP List, and using a filter to only grab things that have the keyword you want.  @PieterVeenstra helped with the syntax and has several great posts, but you can see in my example below I was filtering on the keyword "Facebook".
    20190606.PNG
  • Then I added an Apply to Each loop which increments the KeywordCount for each list item that came back.
  • Finally, the email sends with the variable as part of the body.20190606a.PNG

Totally 1981 For Next loop from BASIC, so I know someone will one-up this with a single line of code...but I had fun doing this.  Keep us posted and let us know if there's anything else.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Count based on phrase in a sharepoint list and recurrence email

@gazzo1967 ,

This one was fun, thanks for bringing it up.  My usual caveat is that this may not be the most elegant solution, but it uses the things I (mostly) know how to do.

 

  • I started with a recurrence trigger to run every quarter, but you can change that to whatever you want.
  • Then, I initialized a variable "KeywordCount" and set it as an integer, with a default value of 0.
  • Then, get the items in your SP List, and using a filter to only grab things that have the keyword you want.  @PieterVeenstra helped with the syntax and has several great posts, but you can see in my example below I was filtering on the keyword "Facebook".
    20190606.PNG
  • Then I added an Apply to Each loop which increments the KeywordCount for each list item that came back.
  • Finally, the email sends with the variable as part of the body.20190606a.PNG

Totally 1981 For Next loop from BASIC, so I know someone will one-up this with a single line of code...but I had fun doing this.  Keep us posted and let us know if there's anything else.

View solution in original post

gazzo1967
Level 8

Re: Count based on phrase in a sharepoint list and recurrence email

@edgonzales 

Thank you for taking the time to answer Smiley Happy

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

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!

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!

Users online (4,447)