Variables: can't find how Target and Project ones interact

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Cecily
Sr. Propeller Head
Posts: 217
Joined: Wed Sep 10, 2008 6:01 am
Location: England

Variables: can't find how Target and Project ones interact

Post by Cecily »

I'm getting back to Flare after a gap, using Flare 2018 v2 on Windows 10 PC.

I have a simple project with Variables > General, and then each of the targets I'm using (PDF and HTML5) has a Variables tab.

I'm trying to find info in help and knowledge base about how the project and target interact, especially the "Restore Defaults" button on the Target > Variables tab.

I changed some values in the targets, then realised it would be easier to change them in the project variables (they can all be the same, for now).

I remembered that target variables override project ones, so I tried Restore Defaults, thinking that would make the target pick up defaults from the project. Instead, it changes the values to an earlier value I used in the target.

So how do I make the target variables match the project variables, short of doing it manually?

And how and why does Restore Defaults work?

EDIT: The issue seems to be just one variable, and just its Definition field. If I change the Definition or Comment of any other project variable, as soon as I Save, the change is copied to the two corresponding target variables. But for VersionNumber, in one of the two targets, the Comment is updated, but not the Definition. (VersionNumber is one of the standard ones that was already in the project template I used.)
"Books are a narcotic." (Franz Kafka)
I wonder what he'd say about help files?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Variables: can't find how Target and Project ones intera

Post by ChoccieMuffin »

I tend to make changes to target variables by opening the .fltar file in a text editor, as I've found that sometimes changes I make from within Flare don't "stick". This was particularly noticeable for me when using a variable called Global_Data.Security_Level, which has a value of "DRAFT VERSION ONLY" in the global_data.flvar variable set but I wanted to change it so it didn't show up in my final output. If I just deleted the value "DRAFT VERSION ONLY" from the target in Flare's Target Editor it ignored the change, so I had to insert a space, which then "stuck" (see below).

I also found that if I wanted to remove that "draft version" flag from most targets, it was quicker to just open the .fltar files in a text editor rather than opening 25 projects in Flare.

If you want to do that, when you open a target you'll find a section that looks a bit like this:

Code: Select all

  <Variables>
    <Variable
      Name="Global_Data/DocReleaseNumber">0101</Variable>
    <Variable
      Name="Global_Data/Security_Level">  </Variable>
  </Variables>
In this instance, my target is what the final target will use. If I want the target to use the value in the Global_Data variable set, as I would want it to during development, I would delete the second variable completely.

Hope that helps.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Cecily
Sr. Propeller Head
Posts: 217
Joined: Wed Sep 10, 2008 6:01 am
Location: England

Re: Variables: can't find how Target and Project ones intera

Post by Cecily »

Thanks, Choccie. That helped.

Opening up all three in the text editor, I saw that for one target, there were no variables define. It just had empty start and end:
<variables></variables>

The other target, where there was just one variable acting oddly, had that variable defined in the target. So I deleted that line.

I'm still not quite sure what Restore Defaults was supposed to do, and surprised I can't find it mentioned in Flare's own help. Saving the project updates the target variables with any changes to the project ones, so... I'm not sure what Restore Defaults would do differently. (And I have no idea how it was picking up an old value, but not a problem at the moment.)
"Books are a narcotic." (Franz Kafka)
I wonder what he'd say about help files?
Post Reply