Expressions

 

 

What's covered?

The purpose of this page is not to provide an exhaustive tutorial on expressions but to give some examples and projets you can download to help your understanding.

In Classic version expressions were known as Build Expressions, in the New UI versions of RoboHelp they are known as Condition Expressions. For simplicity they will be referred to as Expressions in this topic.

Update 24 August 2020 - Originally this topic was for Classic versions of RoboHelp. The 2019 version of RoboHelp introduced a new interface. The topic now covers both versions as the logic has not changed.

Introduction

The simplest way to work in RoboHelp is to think along the lines of what you do NOT want to include. In some versions an expression can be written to Include topics but anyone who has tried will confirm that excluding works while including may not have the desired effect.

It is also important to understand before getting into using expressions to filter the topics that make it to your output, there a big change in how RoboHelp determines what goes into an output.

RoboHelp Classic Versions

Basic Expressions

Here you would simply list the tags for the topics and/or content that you did not want included in the output. If a topic had any or all of those tags applied, it would be excluded from the output.

Advanced Expressions

Here you use NOT to exclude topics, otherwise the tag becomes included. However, as above, expressions work much better if you think in terms of what to exclude.

RoboHelp New UI

In the New UI (2019 and above) the expressions are created in a different way. You are presented with a list of all the tags on the left and you drag them to the right and select Exclude/Include and AND/OR. Sorry to repeat myself but stick with Exclude.

Untagged Topics

Note that any topic or content that does not have a tag applied will be included in the output.

Show Me Some Examples

That is explained in this output from my demo project. Click here. What you will see a topic that explains how the output will change according to the expression applied.

If you want to create all the outputs so that you can see the effect of the different expressions, you can download the demo project to see how things were set up and generate each output.

RoboHelp 2019 Bug

In Classic versions if an output excluded a topic, the TOC seen by the user automatically excluded the TOC entry. In 2019 it is necessary to apply the tags to the TOC entries as well.

Update 1 for 2020 includes a fix for that bug. The 2020 demo project was generated with that update applied.

Donations

If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

Topic Revisions

Date

Changes to this page

24 Aug 2020

Topic rewritten to cover the New UI versions of RoboHelp and provide various demo versions.

09 July 2020

Update revised.

03 Feb 2017

Topic reviewed. No changes made. Any screenshots may differ in your version of RoboHelp but the functionality is the same.

21 Jun 2011

New topic.