Page 1 of 1
Multiple variable sets and table formats
Posted: Wed Jul 14, 2010 9:51 am
by pdxwordsmith
I have several targets that I need to output for a different company (new graphics, variable definitions, table formats, font colors). I figured out how to create a new stylesheet and conditionalize it for the targets, but I can't figure out how to do this with variable sets and table stylesheets.
I've tried creating a new variable set and conditionalizing, but the variables themselves are hard-coded for a particular set. Same with tables.
I know I can override the variable definitions in each target - but I have four of them. I'd rather just create a variable set and associate it with a target (but I can't figure out how).
What is the use case for multiple variable sets (in single-sourcing and otherwise)?
Thanks,
Hanna
Re: Multiple variable sets and table formats
Posted: Wed Jul 14, 2010 11:10 am
by LTinker68
To add a variable set, right-click on the Variables folder in the Project Organizer then select Add Variable Set. Since your signature line says you're using Flare 6, then you can apply conditional tags to the variable sets, just as you would a topic or folder. All variable sets are associated with every target, by default, but you can exclude a variable set using a condition. So your variable sets would be named differently (VariablesA, VariablesB, etc.), but theoretically you could create the same variables in each of them. (I say theoretically because I haven't actually tried that.) Just make sure you don't have variables with the same name but different values in multiple variable sets being used in the same target.
Re: Multiple variable sets and table formats
Posted: Wed Jul 14, 2010 12:14 pm
by pdxwordsmith
I tried what you suggested. The problem is that, within the source, the variables are associated with a variable set (the bit in bold below).
<MadCap:variable name="iTV-Manager.Product_EsqitvManager" />
So, I can't conditionalize to remove that set from the output - even when I do, the source still uses the variable definition from the (hard-coded) variable set.
What I want is to be able to associate a specific variable set with a target (like stylesheets) - not have all sets apply to all targets.
Re: Multiple variable sets and table formats
Posted: Wed Jul 14, 2010 3:17 pm
by LTinker68
Ok, keep what I suggested, but add a step. Instead of inserting the variable directly into the topic, create a snippet file and list the variables one after the other in the snippet file (in one paragraph, not one per paragraph), and apply the appropriate condition tag to each variable. Insert that snippet into the topic where you normally would have inserted the variable. (The snippet should be inserted as text, not a snippetblock, but it should do that automatically, in this case.) When you generate the output, only the variable with the appropriate condition tag will be used in the snippet which will then be used in every topic that references that snippet.
I don't know if associating a variable set to a target is the preferred way to go, if you were thinking of submitting a feature request for that. It's conceivable that the user might want multiple variable sets associated with one target. For instance, if you use Flare's project linking option, then you could have a "global" variable set for all your common variables (company name, website URL, phone number, etc.) and a second variable set for project-specific variables. It might be better to request that the variable set name not be included in the MadCap:variable tag when the variable is inserted. On the other hand, if they did that then it would probably throw up an error in your situation where you insert a variable with a name that's used in several variable sets. In any case, you can submit a feature request at
http://www.madcapsoftware.com/bugs/submit.aspx explaining what you need and we'll let MadCap figure out the logistics.

Re: Multiple variable sets and table formats
Posted: Wed Jul 14, 2010 4:21 pm
by pdxwordsmith
Interesting. Thanks. I'll try it. (I'd still have to edit each (existing) variable
