Jason Goldsmith Posted March 2, 2008 Posted March 2, 2008 (edited) I have three portals on a single layout, and would like to count the rows in one portal and return the result to a field. Again, not much success. Thanks for your help, Jason Edited March 2, 2008 by Guest
LaRetta Posted March 2, 2008 Posted March 2, 2008 Hi Jason, A portal is a relationship signified by a table occurrence. You can count the children (in any relationship) in that table occurrence by, from within the parent, a calculation (result of number): Count ( thatPortal::non-emptyField ) ... where thatPortal is the portal with rows you wish to count and the non-emptyField is (preferably the child uniqueID but at minimum any child field which is NEVER empty). If this doesn't give you what you wish, let us know and we can (with further information) fine-tune it for you. LaRetta :wink2:
Matt Malyschko Posted November 14, 2012 Posted November 14, 2012 Hi Jason, A portal is a relationship signified by a table occurrence. You can count the children (in any relationship) in that table occurrence by, from within the parent, a calculation (result of number) Count ( thatPortal::non-emptyField ) ... where thatPortal is the portal with rows you wish to count and the non-emptyField is (preferably the child uniqueID but at minimum any child field which is NEVER empty). If this doesn't give you what you wish, let us know and we can (with further information) fine-tune it for you. LaRetta How does this work when filtering the portal. I assume one would have to create a new field that contains a value if the criteria you're filtering by is true, and then count that field?
LaRetta Posted November 14, 2012 Posted November 14, 2012 Hi Matty, Just put the same summary field in a one-row portal which is filtered identically to the filtered portal. :-)
LaRetta Posted November 14, 2012 Posted November 14, 2012 Actually I see this old example show using Count() in the parent table. I would instead suggest using a summary field in the child table and use THAT in the one-row portal. I prefer summary fields because they can be placed on any parent layout and adjust their value properly. Calculations created in the parent which aggregate child data are only valuable in THAT parent for THAT child relationship.
Recommended Posts
This topic is 4449 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now