Inserting variables in a TOC entry

This forum is for all Flare issues not related to any of the other categories.
Post Reply
oldhousegeek84
Propeller Head
Posts: 44
Joined: Fri Mar 09, 2007 9:38 am

Inserting variables in a TOC entry

Post by oldhousegeek84 »

Following the Flare 4 help, I inserted the following variable into my TOC entry:

mcvariable:ProductName.MathProduct

Where ProductName is the name of the variable set and MathProduct is the variable name.

When I generate WebHelp, the variable name remains unresolved in the TOC. I see:

Registering for mcvariable:ProductName.MathProduct

What do I need to do to make this work? (And you should pass the answer on to your tech writer to update your help, too.)
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Inserting variables in a TOC entry

Post by LTinker68 »

I have the same setup and it works. Is the variable set associated with the target? (Variables tab in the Target Editor) I only have one variable set, but if you added one later then you need to add it to the target, too.

EDIT: Forget that. I thought there was a button or a checkbox to select a variable, but there isn't. It must automatically associate variable sets. Although you could still check there to make sure it's listed.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
oldhousegeek84
Propeller Head
Posts: 44
Joined: Fri Mar 09, 2007 9:38 am

Re: Inserting variables in a TOC entry

Post by oldhousegeek84 »

Yes the variable set is associated with the Target and the definitions work fine in the topics when I generate WebHelp.
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Inserting variables in a TOC entry

Post by LTinker68 »

Does it work if you try using something from the Primary variable set? There used to be a glitch if you had multiple Glossaries in a project -- it would only do the glossary term linking in the topics with the first glossary listed alphabetically. I wonder if the same type of thing happens with variables -- the variable in the TOC only works with the first variable set listed alphabetically in the project.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
oldhousegeek84
Propeller Head
Posts: 44
Joined: Fri Mar 09, 2007 9:38 am

Re: Inserting variables in a TOC entry

Post by oldhousegeek84 »

It was a good try, but I renamed CompanyName in the Primary variable set (the first one, alphabetically, in my list). Same result. I'm attaching evidence...
varible_setting.gif
variable_output.gif
You do not have the required permissions to view the files attached to this post.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Inserting variables in a TOC entry

Post by LTinker68 »

Well, I'm at a loss. If no one else here has a suggestion then you might want to escalate to MadCap Support.

Does this happen in a test project, too, or just this project?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
oldhousegeek84
Propeller Head
Posts: 44
Joined: Fri Mar 09, 2007 9:38 am

Re: Inserting variables in a TOC entry

Post by oldhousegeek84 »

I tried this with another, much less complex, project and got the same result. :(

If I haven't paid extra for Support, can I still ask them?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Inserting variables in a TOC entry

Post by LTinker68 »

I don't know if there's an avenue available for that or not. I think there is, but there's probably a per-instance fee.

Hopefully someone else on the forum might have an answer. A couple of the tech support guys occasionally cruise the forums so they might jump in with an answer.

You said you tried it with a less complex project. Does that mean it was a project created from scratch in v4? If not, then you might try that. It'll help narrow down if the problem is Flare itself (or your install of it specifically) or if it's a problem with the projects. For instance, if they were imported from RoboHelp then there could be something there causing a problem, whereas a project created from scratch wouldn't have that problem and wouldn't give you the error.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Inserting variables in a TOC entry

Post by GregStenhouse »

The problem is the non-variable text before the variable. Try the following format in the TOC:

Text [%=VariableSet.VariableName%]

So for your setup:
Registering for [%=ProductName.MathProduct%]
Logging in to [%=ProductName.MathProducte%]

Cheers
Greg
oldhousegeek84
Propeller Head
Posts: 44
Joined: Fri Mar 09, 2007 9:38 am

Re: Inserting variables in a TOC entry

Post by oldhousegeek84 »

Awesome. That did the trick, Greg. Many thanks!
booey
Propeller Head
Posts: 34
Joined: Mon Sep 24, 2007 4:38 pm
Location: Sydney Australia

Re: Inserting variables in a TOC entry

Post by booey »

It would be nice if the Flare doco group would correct the help by replacing their still incorrect syntax of:
"For example, you can rename a TOC entry and replace it with a variable from a variable set. To do this, click on the entry and highlight the text. Then replace it with this syntax: mcvariable:VariableSet.VariableName."
with the correct syntax of [%=VariableSet.VariableName%]
gfevrier
Propeller Head
Posts: 45
Joined: Thu Jul 30, 2009 12:10 pm
Location: Tampa, Florida
Contact:

Re: Inserting variables in a TOC entry

Post by gfevrier »

Including variables in a TOC in Flare works great for WebHelp, but I can't get it to work for a Word target. I have books in my TOC with different names from the topic titles. (See attached screenshot -- this is how it looks for the two different TOCs I'm using (one for Word and one for WebHelp.) This is an example of what I see in the Word doc's TOC: Chapter 1: Welcome to [%=FPHelpVariables.FPSC%]. This is what's in the WebHelp TOC (which is correct): Chapter 1: Welcome to BMC FootPrints Service Core. I have two sets of variables, but the most important one is at the top of the list in the Target for both WebHelp and Word (if that makes any difference).

Does anyone know if this is a bug? Any workarounds?

Thanks.
You do not have the required permissions to view the files attached to this post.
Gina G. Wadley, M.Ed.
Staff Information Developer
http://www.ifcatscouldwrite.com

"The most valuable of all talents is that of never using two words when one will do." -- Thomas Jefferson
Post Reply