cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PipManifold
Level: Powered On

Count items in a SharePoint list based on criteria and update in second list

Hi there,

I have two SharePoint lists, A list of registrations to tutor different courses (List has Tutor name, course selected, other details)A new row is created each time someone signs up to mentor and the fields are filled from the form.  The second is the course list (Course name, course contact, etc).

In the course list, I would like to be able to create a live or close to live count for the number of mentors who have registered for each course (something we previously did with a Countif function in Google Sheets.

It looked like this functionality used to be available directly in SharePoint lists as part of the lookup function in the old UI however, has been lost in the new UI.  We have just migrated from Google, so our institution only allows access to the new UI.

I’m wondering if there is a Flow I could build to do this, either which is triggered by a new registration being submitted via the Registration Microsoft Form or on a timer which runs a Flow ever half day or so.

I was playing with the idea of:  

Start: Recurrence trigger

-> Get items (Course list)

-> Get items (Registration list)

-> Condition (If Course column (Course list)=Course column (Registration list))

-> if Yes -> Update item (Course list) – Registration Count column field = (equivalent of a Countif expression)

However, I couldn’t find if there was an expression for this.

Any help or advice would be hugely appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Count items in a SharePoint list based on criteria and update in second list

Hi @PipManifold ,

 

Have you take a try to create the flow?

Do you have problem on the expression to subtract the Update item (Course list) with Registration Count column field?

You could take a try with sub() expression to subtract the Update item (Course list) with Registration Count column field, hope the document about workflow definition language could be your reference:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Count items in a SharePoint list based on criteria and update in second list

Hi @PipManifold ,

 

Have you take a try to create the flow?

Do you have problem on the expression to subtract the Update item (Course list) with Registration Count column field?

You could take a try with sub() expression to subtract the Update item (Course list) with Registration Count column field, hope the document about workflow definition language could be your reference:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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!

Top Kudoed Authors (Last 30 Days)
Users online (5,974)