Accessibility

Table of Contents

Leveraging the user-defined variables feature in RoboHelp 7

Understanding user-defined variables

User-defined variables make it possible to change content globally and streamline your update process. By strategically setting variables for commonly used terms that may change in your project, you'll be able to make rapid changes later. In a nutshell, a user-defined variable allows you to "Change once, change everywhere." You simply set up a variable, give it a value and then use the variable anywhere in your project. This strategy means that you can change the value in one place and it changes everywhere in the project automatically.

A RoboHelp user-defined variable is made up of two elements:

  • Variable Name: Each variable is given a unique name
  • Variable Value: A specified value is assigned to the variable name—this value can be changed at anytime, as desired.

Once a variable name is set up it can be used over and over again in any topic or template within a project. Whenever you change the variable value, RoboHelp will automatically update every instance of the variable in the project.

Let's take a look at how this works. In this example, a company ships a new product called FixIT. The help project uses a variable name {Product_Name} for the product and has the variable value set to FixIT. The variable {Product_Name} is then used globally throughout the project. Six months later, the Marketing Department makes a decision to rebrand the product and changes the product name to SuperFixIT. All you need to do in this situation is change the variable value in one place. By updating the variable value, every instance of the product name will change instantly throughout the entire project.

If you use RoboHelp's powerful single-sourcing capabilities you also have the option to set up different variable values to each single-source layout, either on the fly or as part of a more complex replacement strategy.

Practical uses for user-defined variables

User-defined variables can be used for any terms or values that are used repetitively in a project. They can also be used for terms or values that may change in the future or need to be varied for different single-source outputs. Here are just a few examples of practical uses:

  • Replacing simple terms such as product names, brand names, or version numbers.
  • Changing the terms and values used for multiple audiences. For example, use different currencies for different countries.
  • Replacing terminology used for online layouts versus printed layouts.
  • Personalizing a help system or document. In my experience, people are more likely to read a document if it uses specific terms that relate to their practical situation or task.

You can also use variables to implement complex replacement strategies and use different sets of variable values for each single-source layout. For example, online policies and procedures sometimes reference a variety of companies or user groups. Each company may use different terminology for their department names, staff roles, and so forth. Once all of the variables have been set up, a different set of variable values can be used for each single-source layout.

The practical uses are really endless. Use your imagination to make the variables work to your advantage!

Planning and defining global variables

Updating terms manually can become a painful experience. A few hours spent planning a global replacement strategy will save you a great deal of time in the long run. A while ago, I did some work for a company that changed their name just a few months before I started. I felt confident that the new name was finalized and used the name throughout the project. But wouldn't you know it, six months later they changed their company name again—as well as adding a new prefix to all of their product names! This took days to sort out. If user-defined variables had been used, the company's help systems could have been updated in minutes.

Like RoboHelp's conditional tags and snippets user-defined variables need to be planned carefully. Think about what you need to do now, and even more importantly, what you many need to do in the future. This is a good time to turn off the computer, find a quiet room and sit with a pen, a pad of paper, and a cup of coffee.

If your project will reference many different variables (some projects can use hundreds), you will make things much easier for yourself if you follow best practices and implement meaningful naming conventions. This will also make it easier for you to update the project later.