FYI, you cannot create an expression for use with Filter by Attribute unless the document contains an instance of each attribute mentioned. In particular, you cannot store such expressions in a template unless the template contains elements with the necessary attributes. If you want to provide users with an empty template and predefined attribute expressions, you can give them empty body pages, and put elements with the needed attributes on a reference page.
Lynne, it is remarkable how long the "can't" list is with this feature. Like, how it can't recognize multiple values tokenized by whitespace, a standard convention of XML. Like, how it can't do conditional indicators at all. Like how you can't establish a central library of filtering expressions. Like how it can't consider any other nature of rich markup in a structured document, aside from attribute values. I submit again that it is mostly useless in a serious publication environment. It's a clear case of something invented by people who never actually use this type of functionality. It's especially frustrating considering that a model of proper functionality (IMHO of course) had been on display for years prior.
Even when an appropriate filter expression exists, I have two problems using FBA. One is that when FM opens a document, it shows all content and then applies the current filter. Depending on the quantity of material hidden as a result the page count can change, but resulting blank pages at the end are not deleted. Thus, to print (or save to PDF) a book without numerous blank pages at the end of every book component, it may be necessary to open and save all book components first.
The other is that it seems that Save as PDF takes 25 times longer when a document has a significant amount of hidden text, whether the text is hidden as conditional text or as FBA. I have a file that's about 360 pages long, consisting of 340 sections, each starting on a new page. When I save as PDF showing all text, it completes in under a minute. When I hide particular elements that occur on most pages and then save as PDF, it takes about 25 minutes. It doesn't matter if the hiding is done with conditional text (no expressions are needed; it's just a simple case of hiding one tag) or with FBA.
Have you experienced such performance issues?
Lynne, I have not experienced these issues, but only because I judged the feature unusable well before I reached that point.
that issue is well known for us since FM9 (maybe even before). PDF generation and general document handling becomes a chore when using filters. It even sometimes ends up in crashing the whole process.
Furthermore, we encountered one mayor problem with filtering by attribute: There is a hardcoded limit of 256 characters for the filter logic expression (at least up to FM11).