7 Replies Latest reply on May 30, 2012 8:29 AM by philmodjunk

    portal record number

    Fagreement

      Title

      portal record number

      Post

      Hi,

      Simple question:

      how can I get the total records in a portal ?

        • 1. Re: portal record number
          philmodjunk

          The number of records or the the total of a field in the portal? Both can be done.

          Is this a filtered or unfiltered portal?

          If Unfiltered, a calculation field defined in the parent table as: Count ( relatedTable::NeverEmptyField )

          will count the number of related records and this will match the number of records in your portal.

          In both filtered and unfiltered portals, you can define a summary field in the portal's table as teh count of a field that is never empty.

          For unflitered portals, you can put this field directly on the parent table's layout. For a filtered portal, you create a one row portal with the same portal filter expression and place the summary field inside that portal's row.

          • 2. Re: portal record number
            Fagreement

            You said: "In both filtered and unfiltered portals, you can define a summary field in the portal's table as teh count of a field that is never empty."

             

            I didn't well understand: should i create a PhotoCount field in the portal table? calculation field? global? count(photoID) ?

            • 3. Re: portal record number
              philmodjunk

              Any field that always has a value in every record of the table can be used with a "count of" summary field or the count() aggregate function to count records. Often, a primary or foreign key field (the one needed for this portal's relationship) is used for this as these fields should never be empty.

              • 4. Re: portal record number
                Fagreement

                I created a global field in the table and i put count(photoID) but in the browse mode nothing is display in htis field !

                • 5. Re: portal record number
                  philmodjunk

                  Make it an usntored field of type calcualtion. Do not make it a global field and it should show the count of records in the portal.

                  • 6. Re: portal record number
                    Fagreement

                    what is unstored field? how can i make it?

                    actually it's global

                    • 7. Re: portal record number
                      philmodjunk

                      Don't make it global.

                      In manage | database | fields

                      enter the field name, select "calculation" as the field type and click 'create'.

                      Enter your expression in the specify calculation dialog.

                      Click the Storage Options button

                      Select the "do not store" option.