4 Replies Latest reply on Nov 17, 2016 7:13 PM by philmodjunk

    Portal rows calculation



      How can I calculate how many rows have been used (data entered) in a portal?

      Let's say we have a class of many students and students have been added in a portal, now I'd like to show how many students participating for this particular class, just the total count.


        • 1. Re: Portal rows calculation

          You could create a calc field in the Class table as


          Count ( Enrollment::primaryKey )


          but its usually better – more versatile* – to create a


          summary field, type Count of: primaryKey in the Enrollments table


          and display that as a related field on the Class table.


          You can use the Count() function in a script if you need that number programatically.


          *Because you only need to create this field once, then can use in reports or other related tables; the Count() calc field would have to be re-created in each of these related tables.

          • 2. Re: Portal rows calculation


            Since portals show related data (in your case, related students who enrolled in a class), you can use the Count ( ) function to show the count of related records. Inside the function put any related field that always contains data; most people would use the primary key field.


            This function will count the number of records in the students table through this relationship.

            • 3. Re: Portal rows calculation

              In the table you want to show the number of students, create an auto enter calculation. Place field on the class table.


              Count(Field showing in portal that is not empty) set to allow change.


              Count(Student;Student Name) where Student is the name of the portal showing the records.


              • 4. Re: Portal rows calculation

                Auto-enter calculations do not automatically update when the change is to a referenced field in a related record. Adding or removing records from the Student table will thus not update this auto-enter calculation.