web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Count the number of it...
Power Apps
Answered

Count the number of items in a sharepoint list

(0) ShareShare
ReportReport
Posted on by 43

I am making a discipline tracker for a school and I need to count the number of times a student name is entered via the PowerApps form. 

 

Is there a way to count the number of times a student's name is entered and then have it show up in another column in the SharePoint list?

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    You can use a CountIf() for smaller lists. That function will return the number of rows which match a given condition (in your case it will be something like studentName = Author.DisplayName)

     

    However, for a large list (in PowerApps this is >500 items) you will need to do something along the lines of the following:

    • Create a new text field which includes a unique identifier for the student (probably email)
    • Copy across their email address into this field (and make sure any new records do so automatically)
    • Do a ClearCollect() and make a new local collection from the sharepoint list, filtering using the students email against the newly created text field.
    • Count the rows on this new local collection.

     

    The reason for this is that PowerApps does not support delegation on the Person field on larger lists. If you are to use just a CountIf() and try to filter on the author.displayname field, you will only be accessing the first 500 rows. Any results after will not be retrieved. Quite annoying having to essentially double up on the email but unfortunately it is a limitation we have to deal with at the moment.

  • Verified answer
    v-micsh-msft Profile Picture
    on at

    Hi @racheljgood119,

     

    Agree with @Anonymous here.

    All the count function under PowerApps is not delegable in PowerApps, so your better choice is to count the collection:

    Delegable functions

     

    The other question is to have the count data show up in another column, if it is only required to add the count number into the new record, then that is easy to be done, just create a Variable and have its value set to countif() +1.

    Updatecontext({CountNum:Countif() + 1})

     

    And if you would like to update the count value in all the records with the same name, then it comes to another issue related to delegation.

     

    Regards,

    Michael

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard