cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

How do I include a count of a field in my automated mail based on my conditional flow?

Hi!

 

I use flows to generate emails based on the value of numerous fields in a form built using InfoPath, in a SharePoint list.

 

In the automated mail is this: 'Access Required For: Bloggs, Joe'.

 

What I want to do is include in the mail a count which shows how many requests have been submitted for the user in question.

I.e. 'Access Required For: Bloggs, Joe'.  'Number of Requests Submitted For Bloggs, Joe'.

 

The name is just a Display Name field of the user specified in the form when submitted in the list. Is it possible at all to get a count which shows the information I am after?

 

Any help at all would be greatly appreciated.

Thank you!

Charlie

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: How do I include a count of a field in my automated mail based on my conditional flow?

There are several ways that you can accomplish a count of items with Power Automate. In the comments of the Get a count from SharePoint list idea@gamoraes outlines how to perform this task. This Using the Workflow definition language in Flow solution may also be of some help if you have issues with formatting.

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

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!

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: How do I include a count of a field in my automated mail based on my conditional flow?

There are several ways that you can accomplish a count of items with Power Automate. In the comments of the Get a count from SharePoint list idea@gamoraes outlines how to perform this task. This Using the Workflow definition language in Flow solution may also be of some help if you have issues with formatting.

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

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!

View solution in original post

Highlighted
Regular Visitor

Re: How do I include a count of a field in my automated mail based on my conditional flow?

Hiya Brad,

thanks for your response that's really helpful, and the tips on how to write a good post have been noted for future reference!

 

I'm not receiving any error messages, I was just hoping to add a count to the email that is generated when a form is submitted in the SharePoint library.

 

I've attached a screen shot of my flow. I have highlighted in red the field i would like the count based on. I.e. for that user, for any future submissions I would like to say - 'Number of Submissions for <USER>: 12345'

 

Flow for 'When New Item Created'Flow for 'When New Item Created'

 

I have had a look through for a while on the available metadata to include on the mail but I can't see anything for a count. I may be able to create a separate flow which works out a count but the issue is I need the count to be worked out and included in this initial email that is sent when a user creates an item.

 

I hope this additional info helps, I will definitely look into the solution you have linked to as well if I do need to create a new flow.

 

Thank you,

Charlie

Highlighted
Super User II
Super User II

Re: How do I include a count of a field in my automated mail based on my conditional flow?

You will need to do a Get Items on the list and work out the count of records for the specified user.

 

Using the ODATA Query i am not sure supports people picker so if it is a people field you may need to loop through the items and make a count variable that you add to

Highlighted
Regular Visitor

Re: How do I include a count of a field in my automated mail based on my conditional flow?

Thanks for your response, I'll look into this to see if it if a viable option!

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

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!

Users online (10,033)