On a layout, you have two groups of records: the Found Set and (for lack of a better term) the Omitted Set--the records not pulled up in a find or other action.
There are any number of ways to pull up a found set on a layout and once you have done so, they are all treated the same. Thus, you can show "x of y", but this is simply reporting data from the found set and total records--there are get functions for these, they will not tell you how that found set was produced.
If, you use scripts to pull up your found sets, there are ways to have your scripts set values in global variables to record how the found set was produced.
I was thinking that there must be a way to do this without scripting, since Filemaker has this information. For example, the "Show All" button is greyed out unless you are looking at a filtered set.
I often use two unstoared calc fields.
#1 is calc set to Get (FoundCount)
#2 is calc set to Get (TotalRecordCount)
Never used it this way, but if #1 = #2, you could set a conditional format ...
If you don't want the fields, simply put the arguments in the conditional format definition.
You can also, when in layout mode, use the insert menu to insert symbols for the total records and found count. In browse or preview modes, these symbols will then be replaced by the expected numbers.
Cool...that one was new in FMP12...didn't know it. THanks!
Thanks all. I have changed my design a bit and I think Ninja's calc fields will work for me.
If I want to have a label with this information on a layout, what should the label contain?
I want the label to be something like:
Showing <<get(FoundCount)>> out of <<get(TotalRecordCount)>> records
I can create a field in the database, but is there any way to avoid doing that for each different dynamic label I might like to create.