Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Find/Change with Conditional Text

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.

Mike Rankin

Mike Rankin

Editor in Chief of InDesignSecrets.com, InDesign Magazine, and CreativePro.com. Author of LinkedIn Learning courses on InDesign, Illustrator, GIMP, Inkscape, and Adobe Dimension.
Mike Rankin

Latest posts by Mike Rankin (see all)

  • - November 30, -0001
Related Articles
Comments

5 Comments on “Find/Change with Conditional Text

  1. To me it makes sense that you can’t change what you can’t see. I bet I wouldn’t ever have found out about this bug/feature/quirk since I like to be able to see what I’m doing…

  2. I just noticed an interesting aspect of conditional text today. If you are working in an InCopy work-flow, the IC users will not be able to create new text conditions, but they will be able to use them. This is consistent with how IC handles styles too since ID creates them and IC uses them.

    I just wanted to put this out there so people realize that the designers will still have to create the conditions before the editors can use them.

  3. I’m just wondering if there’s a way to find the hidden conditional text indicator markers in indesign. I don’t want to find hidden text, I just want to find the orange markers when I have invisibles showing. Any ideas?

  4. Hello Mike,
    Your article looks interesting.
    Recently I got a indd file with embedded xml tags. During checking validity, I’m facing same problem, but there is no condition layer in my indd file.
    When I export the indd file to xml, it shows large amt. of untaged text (main reason for validity error) that is not visible in indd file.

    I tried my best to find this text thru indesign find/change tool using all options. Please suggest, any help highly appreciated.

    Thanks,
    Pratap

  5. Pratap-

    That’s strange. If you export XML, you should only be getting the tagged elements. Are you using a script to export or doing it manually? If you’re using a script, try doing it manually via File > Export and see if you get the same results.

Leave a Reply

Your email address will not be published. Required fields are marked *