HunterBoss Posted April 20, 2010 Posted April 20, 2010 Is there a basic way to count the number of records in a portal? But, I don't want the value in the portal. I want it on the layout that the portal is on. I have a portal relating account records to clients. Using information on this forum I figured out how to get the conditional formatting I want -- if there are more than 5 records in the portal of the same account type the back ground color is changed. What I'd like to do is have the number of records in the portal on the layout. Why? I want to perform finds based on that value. Thanks in advance. Christopher
bcooney Posted April 20, 2010 Posted April 20, 2010 In Parent, create calc field = count (portalrelationship::primaryKeyID).
HunterBoss Posted April 20, 2010 Author Posted April 20, 2010 Thanks, but I can't get that to work. I added the a calculated field to Parent (the table that the parent layout is based on). But, the child table is related to Parent by 2 fields within the record. The field created in Parent is PortalCount. The calculation is Count(Child::Filing_ID). But, Child is related to Parent by Filing_ID and Plan_Num. I did modify the formula by entering both field names with a semi colon between them. No joy. What am I missing? Christopher
jdu98a Posted April 21, 2010 Posted April 21, 2010 The Count() function simply returns the number of related records that contain a non-blank value in the given field. It actually doesn't have to use the key relating field at all. It can be any field in the related record. Just make sure that you use a field that is guaranteed not to contain a blank value. An auto-enter ID field is usually best.
bcooney Posted April 21, 2010 Posted April 21, 2010 Use the same relationship to count that you use to display the portal. What is the name of the Table Occurrence for the portal? PortalCount = count ( portalRelationship::_keyID )
HunterBoss Posted April 21, 2010 Author Posted April 21, 2010 Well, I guess full disclosure is in order. I made a mistake in naming my fields and as a result selected the wrong field on the wrong table to display the portal row count. Now that I'm pointing to the right field it's working. Thanks everybody Christopher
Recommended Posts
This topic is 5386 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