Search Summaries Searching - Summaries FieldNamesumm=T
Creates summaries from a search.

Sometimes you want WebDNA 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 with unique values and greater than 90000 in the ZipCode field, then enter a URL something like this:

http://Results.tpl?command=search&geZipCodedata=90000&ZipCodesumm=T&ZipCodesort=1&db=SomeDatabase.db

The template "Results.tpl" display after the search, and any [FoundItems] contexts in it fill with found records. "ge" stands for "greater than or equal," meaning the ZipCode field must be greater than or equal to 90000, otherwise it will not be considered a match. ZipCodesort=1 causes the results to be sorted in ascending order by ZipCode. ZipCodesumm=T tells WebDNA 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.

Note: it is important to sort by the same field you wish to summarize -- this sorting enables WebDNA to easily see when a field changes from one value to another in the sequence of found items.

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

User Contributed Notes
SearchSummaries  

Copyright © 2008 WebDNA Software Corporation, Inc.