Searching - Summaries
FieldNamesumm=T
Sometimes you want WebCatalog to summarize information in a database by only showing records that are unique in a particular field. For instance, if your database contains a list of names and addresses, you may want to see how many unique zip codes are in the database. To summarize records, add "FieldNamesumm=T" to a search command.
If your database has a field called "ZipCode", and you want to look for records that have unique values and are greater than 90000 in the ZipCode field, then you would enter a URL something like this:
http://Results.tpl?command=search&geZipCodedata=90000&ZipCodesumm=T&ZipCodesort=1&db=SomeDatabase.db
The template "Results.tpl" will be displayed after the search, and any [FoundItems] contexts in it will be filled with found records. "ge" stands for "greater than or equal", meaning that the ZipCode field must be greater than or equal to 90000, otherwise it won't be considered a match. ZipCodesort=1 causes the results to be sorted in ascending order by ZipCode. ZipCodesumm=T tells WebCatalog that if one or more zip code are identical, they are removed from the list of found items. Only the first matching ZipCode record is displayed.
| Sort by ZipCode (not summarized) ZipCodesort=1 |
|
|---|---|
| John | 92069 |
| Grant | 92128 |
| Jay | 92128 |
| Sort by ZipCode (summarized by ZipCode) ZipCodeSort=1&ZipCodeSumm=T |
|
| John | 92069 |
| Grant | 92128 |