Hi Dan: did you want to have this display in a preview report where a summary field could work? Or rather as a displayable number in browse mode?
Also: FYI don't always go by what's listed in those help links like the one you quote. A better way to display a count of related records is to simply put an unstored calc in the child table that is Get ( FoundCount ). Put that related field on your parent record; it's less taxing on the db than the other method.
You could do this with a simple script run from your appointments table, and a global field to store the count in the appointments table.
First find the date range of the appointments you are interested in.
Then use the Go To Related Records (GTRR) script step to navigate to the clients table and find the clients associated with the appointments for that date range
Set the global field in the appointments table with Get(FoundCount)
I have attached a sample file
I am sure there will be numerous other ways to do this
ClientAppt.fmp12.zip 68.6 K
This will work if I want an overall total of # of Unique Clients / Appointments, but what about when I want to split it by Sales Rep?
Say a sales rep goes out to 20 appointments, but only 10 of those are unique clients, well I would have a sub-summary to total # of appointments / unique clients, and then I want to see by sales rep the # of appointments / unique clients.
I am trying to display this on a sub-summary report in browse mode. I would like to be able to print this so it would have to work in preview as well.
Basically I have 2 sub-summary parts:
1. Break field is the Sales Office the Appointment is assigned to.
2. Is the Sales Rep that the Appointment is assigned to.
So it would need to summarize how many unique clients out of the total appointments there are by Office and by Sales Rep.
If you have 2 lists:
masterList = List of all your ClientIDs (easy to have - just get it through a X relationship from apps to clients)
AppSalesRepList = a list of the clientID's that you get through a relationship filtered via salesRepID, appDatebegin and appDateEnd
ValueCount(FilterValues(masterList; AppSalesRepList)) will give you the answer.
masterlist = List(1;2;3;4;5;6;7);
will output 4.
How about a simple Find for the date range
performed on a layout for Clients
but entered into the related field for the Appointment date?
It should find the Clients with appointments in the date range.
Interesting approach... I like it.
This got me in the mindset I needed. Thank you Karina! I'm now having no issue finding the numbers I need.