Find/Change with Conditional Text
Conditional text is one of the coolest new features of CS4. You can even apply conditions with Find/Change. But there are a couple of quirks to be aware of.
At last week’s InDesign Conference I presented a session on Long Documents, and one of the topics I covered was conditional text in CS4. If you haven’t seen it yet, conditional text is a great new feature that allows you to make customized versions of a document by tagging text and anchored graphics with conditions, then showing or hiding those conditions.
At one point in my demo, I stumbled on a little “gotcha” as I was showing how conditional text could be used to create both a teacher’s version and a student’s version of a math worksheet. Conditional text is wonderful for this kind of thing. I set the answers right inline with the questions, so that if/when the page reflows, the answers go with the flow. Also, if questions are cut and pasted, answers easily go along for the ride. It’s a beautiful thing.

One of my favorite things about conditional text is how you can use Find/Change to quickly apply conditions?especially since you can’t automatically apply conditions as part of a paragraph or character style. I had my answers styled with a character style, and used that as the basis for applying a condition. There was just one problem. I had turned off the visibility of the Teacher’s Edition condition just before I opened Find/Change. In the Find/Change dialog, the Teacher’s Edition condition was no where to be found. Not grayed out, but absent, as if it didn’t exist.

Hmmmm. After the prompting of an eagle-eyed audience member (thank you, Fritz), I went back to the conditional text panel and made the Teacher’s Edition visible. That made it appear in Change Format. Whew! But wouldn’t it make more sense if it were there, but grayed out? Methinks, yes.
I wondered if I could circumvent this quirk by showing the condition, then making and saving a Find/Change query which applied the condition.

Sure enough, it works. When the saved query is used, Find/Change applies the condition, even if it is hidden. There is one weird thing to note, though. After the Find/Change is done, the newly conditioned text remains visible, even though the condition itself is hidden.

But if you toggle the visibility of the condition on and off, the text hides as it should.

One more thing, and this might cross the line from “quirk” to “bug.” Hidden conditions do appear in Find Format. You can select them as the basis of a Find/Change and run it. But your results will be disappointing. Basically, no text will be found, and no error will appear to let you know something is wrong.
If you do Find, you get:

If you do Change All, you get:

In both cases, it looks like you were searching for something that didn’t exist. But text with that condition does exist, it’s just hidden. It would be a lot nicer if you were told something to that effect. Using a saved a query from when the condition was visible won’t change what happens in this case.
None of these Find/Change quirks are enough to make me dislike conditional text at all. I still think it’s wonderful and welcome feature, especially when combined with Smart Reflow in a long document. But I think the integration with Find/Change could use a little polish.
This article was last modified on December 19, 2021
This article was first published on November 17, 2008
