• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Converting text to variables in RH7

New Here ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

I'm upgrading a RH5 project to RH7 and I want to convert all the occurrences of our product name to a variable called ProductName. Do I have to do a find on each one and then convert it? A find-and-replace that allows searching for a text string and replacing with a variable would be sweet, but it doesn't seem to work that way.
What are my options, other than brute force?

Views

256

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

Hi Frank,

First thing, it is not going to be that easy even if you use a powerful replacement tool like BKReplacem. You need to replace 'Product Name' with simlar code to the following .

<uservariable name=Product_Name x-format=Product_Name x-value='product name' x-showvalue>Product Name</uservariable>

Secondly, your are also going to have to be a little careful using a search and replace tool as you need to think of all the places where the product name may be used and replacement is not appropriate. Do you use the product name in a filename for example - if so the filename used in any topic hyperlinks may end up braking the link.

If I were in your boots I'd create an output file of the project and run a search with search highlight on. Track all occurences and yes (not what you wanted to hear sorry) replace each occurence manually.

Luckily working with variables in RH7 is a lot easier the RH6. You can simply drag and drop the variable from the pod to a topic.

There is one other trick that I can think of that may help you with this process.

1. Firstly, when you create you variable, make sure you use exactly the same Variable Value as the text used for the current Product Name throughout your project.

2. Find and select the product name within the topic.

3. Right click to display the shortcut menu and then select the Add to - User Defined Variable option.

If the selected text matches the variable name you set up, it is automatically convereted into a variable.

Hope that helps
Craig

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

LATEST
Hi Craig -

Thanks for the quick response.

I've always been very leery of using RH's find-and-replace - too easy to miss occurrences due to line breaks and too easy to mistakenly replace strings in hyperlinks or other places that should be left alone.

I think for my own peace of mind, I'll stick with your second suggestion.

- Frank -

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp