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

counting records


zstadel

Recommended Posts

I want to put a merge field in a layout that displays a count of the total number of records (not just those in the present found set) that have the same value for field A as the current record being viewed. Can anyone tell me how to do this without scripting a find that would "forget" the particular found set that the user may be viewing?

 

Example...

RecordID: 001

FieldA: G

MergeField displays: 2

 

RecordID: 002

FieldA: H

MergeField displays: 1

 

RecordID: 003

FieldA: G

MergeField displays: 2

Link to comment
Share on other sites

Create a calculation on the table the records in your example are from.

 

Count ( Table A Self::Field A )

 

Where the Related Table occurrence is one you will have to create. Assuming you are counting the total # of records with the same Field A value in the one table, it will look something like:

 

TableA ----> TableA Self

 

The Predicate of the relationship will be: Field A = Field A

 

 

Now, every record has a calc which looks through to all records with the same Field A value as itself, and counts them. Just show the calc on the layout.

Good luck.

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use