Use variable as a definition for another variable

This forum is for all Flare issues related to styles, stylesheets and XML.

Use variable as a definition for another variable

Postby kerimucci on Thu Mar 18, 2021 5:43 am

I have a product version variable for each of the products that I write about, and I also have a general title version variable that is used on my PDF cover pages. The general title version variable exists because I have one topic for my cover page that is used across multiple targets, changing based on the related product version. I thought this was wiser than duplicating my cover page.

This means when we have a release, I need to update the product version variable, as well as the title version variable for each target I need to publish.

Is there a way to set up the title version variable definition so that it is automatically replaced with the definition for that of the associated product version variable? This would mean I'd only need to change the product version variable with each release.
kerimucci
Propeller Head
 
Posts: 51
Joined: Thu Nov 02, 2017 3:38 am

Re: Use variable as a definition for another variable

Postby doloremipsum on Thu Mar 18, 2021 5:50 pm

Good news, it absolutely is possible! You can set the definition for your title variable as something like this:

Code: Select all
ProductA Version [%=Variables.VersionNumber%]


And it will automatically insert the correct version number during the build.
neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit - sed saepe cum dolor apud multos callidos mutuetur, reduci potest.
doloremipsum
Sr. Propeller Head
 
Posts: 182
Joined: Mon Aug 26, 2019 2:11 pm

Re: Use variable as a definition for another variable

Postby kerimucci on Mon Mar 22, 2021 3:09 pm

Thank you so much! Worked like a charm.
kerimucci
Propeller Head
 
Posts: 51
Joined: Thu Nov 02, 2017 3:38 am


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 11 guests