Skip to main content
June 12, 2012
Question

Making text display with conditional build expression

  • June 12, 2012
  • 2 replies
  • 2871 views

I'm having problems getting images and text strings to display in my single-source outputs. I have strings and images that have multiple build tags applied to them, and when I try to build for one of my SSLs, those strings and images don't show up because of multiple tags applied to them.

For example, I have a string that has the conditions A, B, C, D, and E applied to it. (These are not the actual condition names; just for this thread's purposes). I want to generate the C output and have the string display, even though it has the other conditions applied to it.

Peter Grainge: I read the Build Expressions wiki on your page and tried this combination (C AND NOT A AND NOT B AND NOT D AND NOT E). Sometimes I got the result I expected (the string displayed), and other times not (no string or image displayed), even though strings had the same conditions applied to them.

Any idea why it's not working? Does the order of the conditions matter? e.g., the way you use them on the string, they should appear in that order in the build expression?

This topic has been closed for replies.

2 replies

June 15, 2012

I've also run into this problem and I could not get the build tags to build correctly in an output. If I did it in a simple project, it sometimes worked, but once applied to even a single topic in a larger project, it broke.

What I've found most effective is to use all exclude conditions; tag everything the opposite of what you want it to be. In your example above, if you only have the five conditions applied to a string of text or to images, in the SSL make the output be only NOT A AND NOT B AND NOT D AND NOT E. If you don't specify a build tag in the SSL, it is output in the final build. (EDIT: Granted, with that setup, the text will always output. Even with your original SSL statement, the text will output since it's tagged C.)

Or, as another example, I have stuff needs to be output in only one build for developers and another build for the help users. Anything that is going to be included for the developers is tagged not_help (that's the build tag name). Then in my SSL for the developer output, I don't include this tag. As a result, RH outputs everything (the whole paragraph below in example text is output). For the help build, I have NOT not_help included in the SSL. As a result of that, the help build leaves out the tagged content (only the first sentence of the paragraph below in example text is output).

Example text:

This is an example text. <not_help>This information is not be included in the help.</not_help>

One of our projects contains many such tags for roles (role1, role2, role3, role4, for example). Some topics need to be output for role1 and role3, so for that build expression in the SSL we simply put NOT role2 AND NOT role4. We don't mention the other tags (role1 or role3), so those tags are brought into the output.

It seems to be easier in RH to specify what is not included than to specify what should be included. Once you specify one thing to include, you have to specify them all (at least that's been my experience).

Peter Grainge
Community Expert
Community Expert
June 18, 2012

Generally Exclude expressions are the easiest and are probably the first option to go for but there are times when they will exclude stuff you want in.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
June 18, 2012

That is a very small project. Have you tried opening the Salesbuilder sample project and comparing? It is smaller than your project but larger than the other sample.

Click Open on the RoboHelp Starter page and then click Samples in the ribbon on the left.

You have pointed to a potential cause but not indicated whether or not you have publish locations with lots of URLs.

Next step would be to create two copies of your project and in each half trash a different half of the topics. Ignore broken links. Does one half then work quicker?

Just how bad is this slowness?


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge


Slowness is horrible. I'll right-click on an SSL, waiting for the pop-up dialog to show. It can take more than a minute for the pop-up dialog to show up, if it does at all. When I click one of the commands on the pop-up (typically Generate or Properties), it can take another minute before the webhelp output dialog displays. Slowness is exacerbated every time I click in the Single Source Layouts pod.

I leave Task Manager on to monitor how much CPU-resources RH takes when I click on these layouts. CPU usage is always maxed out and the RH screen sometimes goes completely white and tries to refresh and repaint. This is all happening as I type.

I have 19 websites defined for publishing, but for any SSL, I only ever have two selected for publishing. Will I see an improvement if I delete them? I hand off my webhelp projects to another writer through a Dropbox account, so I don't need them defined anymore.

I'll look at the sample project and try the two projects approach.

Peter Grainge
Community Expert
Community Expert
June 13, 2012

Difficult one. I don't think the order is important, what matters is what you include and exclude and your expression prima facie makes sense.

I would step away from the real project and set up a simple test project as I did for the expressions download on my site. That often makes is easier to see what is going on and get things working. Then you can apply your expression in your live project.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.