Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Portals, Aggregate counts & Relationship keys


Bush

Recommended Posts

Roight, I'm buggered, here. Worst part is, I believe it's self-inflicted.

 

I've two files (fm6), "Subject" and "Family" (the subject's family members. Not all records w/in Subject have family (most don't). My key linking the two files is a kludge of lastname/firstname/Subject'sLocalID (a serial#).

 

The problem is I'm trying to display on a 'dashboard'-type layout aggregate counts from the subject AND family files. So I create a portal and insert the field (say, # of affected family members) and... it's empty. No data appears. On a whim, I scrolled through subject file 'til I reached a subject WITH family and -- VOILA! -- the correct # of affected family appeared.

 

My question is: Would a better key correct this problem? Or must I further increase the kludge by scripting something that forces the user to a subject with family.. or should I create an empty Subject with family link and force the dashboard to that screen (which'll throw off my count(s) unless I script around that...)

 

lord (or Ray, or Queueueue or..), please he'p me!

Link to comment
Share on other sites

[ QUOTE ]

The problem is I'm trying to display on a 'dashboard'-type layout aggregate counts from the subject AND family files.

 

[/ QUOTE ]

 

I'm having some trouble understanding. These aggregate counts count cross all records or only cross related? If the latter, then if the portal is empty, then the field count(join::field) would be empty too. Or am I missing something?

 

I think I need to see some field definitions before being able to answer (if at all...)

 

kjoe

Link to comment
Share on other sites

Right.. Thanks for taking a stab, kjoe, I was gettin' paranoid about the silence.

 

The calculation is pretty simple: if I want to know how many subjects are 'pending', then it's

 

Unstored,If(record_status='pending',1,"")

 

Then I have a matching summary field that merely counts all the 1s in the previous field. Then I display the SUM field. Voy-ola, works great.

 

The problem is when I try doing this from the master file ("Subjects") to the subordinate ("Family") file.

 

These files are linked via the subject's "local_ID" (used to use a concatenated name+ID field but stopped that due to UserErrors). The relationship works fine.

 

The problem is, when from the SUBJECTS file I attempt to view a SUM of a FAMILY count (say, a count of all FAMILY members "pending"), the pertinent field is empty unless I am on a subject with family records.

 

So, if Joe Smith has no family and I am on his record, the dashboard displays _____. Not zero, nothing.

 

If I am on Sam Spade and he has 1 or more family members, the dashboard displays 29 or whatever the correct count may be.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use