AnsweredAssumed Answered

Using Count()

Question asked by BetoBoton on Aug 13, 2009
Latest reply on Aug 13, 2009 by BetoBoton


Using Count()



I would appreciate someone with a bit of patience with this old man, shedding some light to this problem.


I'm trying to figure this out and probably there is more than 1 solution but it seems I don't find a way out of it.

I would appreciate if someone can show me how, and where these calculations will occur.

I believe the field definition will state the field is a calculation type, and will hold the Count function.

Then I did that and it doesn't work the way I expected...


Here is what I've done:

N Times Calculation (Number) Indexed, = Count ( Referee ID ), Evaluate even if all referenced fields are empty 

Definitions below



How do I use COUNT() to solve the following simple 1 to Many case.


My scenario is this one:


1- Table Contacts has an indexed field Contact ID (Number) and an indexed field Reference ID(Number) 


2- Table References with an indexed fields Reference ID(Number)  and Referee ID(Number) 


3- Relationship Contacts::Reference ID is related   to     References::Reference ID


Each contact (Contacts::Contact ID) was referred by 1 person References::Reference ID 

Many references can have the same Referee ID.



Table Contacts has what I want to be a Calculated via script field Contacts::Referred N Times which is how many times this contact has referred other contacts




Table References has:


References::N Times which is how many times this same References::Referee ID occur in this References table and also a

References::Count which is the Xth time this reference is, for this Referee ID.