cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gazzo1967
Impactful Individual
Impactful Individual

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

@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
edgonzales
Super User
Super User

@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.

@edgonzales 

Thank you for taking the time to answer Smiley Happy

Helpful resources

Users online (4,317)