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.
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) ?
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.
I created a global field in the table and i put count(photoID) but in the browse mode nothing is display in htis field !
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.
what is unstored field? how can i make it?
actually it's global
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.