Eliminating duplicated/repeatng values
The problem:
You have repeated values in your Publishing Style Sheet, and you only want each value to appear once.
A typical example would be where you are sorting a list of association members first by city and then, under each city, by company name. You only want each city to appear once.
There are two ways to achieve this:
Unique Group Entry
- Open up the Element that contains the repeating value field ("city", in this example)
- Go to the Preferences tab
- Select the Unique Group Entry checkbox
- Save the Element
- Important! For this to work, you must make sure that the data is sorted on this field.
"Do Not Include" option in Formulas
Another way to achieve this is to use the Do not include if element data is the same as previous option in a Formula. This can be useful when you are using a Formula to decide what data to publish or when you simply want to eliminate duplicates without actually sorting on that field.
- Create a new Element and select the Formula option
- Set up your Formula to determine what data to publish
- Select the Do not include if element data is the same as previous checkbox at the bottom of the window.
- Save the Formula
As each record is published, CatBase will evaluate the contents of that Element and compare them to the same Element in the previous record. If they are the same, the second instance will not be published.