Page 1 of 1

ORing and ANDing conditions

Posted: Thu Jan 28, 2016 8:34 am
by oceanclub
Hi all,

I've hit a problem where material is tagged with both version numbers and with components. The problem is that the method used means that version numbers should be considered ORed while components should be considered ANDed. That is, if material is tagged "Version1 Only" and "Version 2 Only", the material should be included if _at least one_ of the versions is included - the condition tags in the target look as follows:

Include Exclude
Version2 Only X
Version3 Only X


The problem is where there is material only for a particular component _and_ for a particular version. In that case, the text is tagged with, say, both "Version2" and "Widget"

Now, I want to generate a version of the manual for Version 3 that excludes the Widget material:

Include Exclude
Version2 Only x
Version3 Only x
Widget X

Unfortunately the "Include" for "Version3 Only" overides the "Exclude" For "Widget", so the text with both condition tags "Version3 Only" and "Widget" is included when it shouldn't be.

If I _omit_ that Include, however....

Include Exclude
Version2 Only X
Version3 Only
Widget X

.... then material tagged both "Version2 Only" and "Version3 Only" is excluded (since at least one exclude applies and there is not explicit include"

OK! If anyone understands this (and it took me a while too), is there any easy way out of this??

P.

Re: ORing and ANDing conditions

Posted: Thu Jan 28, 2016 10:59 am
by devjoe
At the bottom of the Conditional Text panel there are Basic and Advanced buttons. If you click Advanced, then you can specify your own combination of conditions with AND and OR and NOT to get the output you want. You can see this fill in while you are in the Basic mode to get the idea of the syntax.
For the case of your version 3, no-widget output I think you want:
( Version3 or not ( Version2 ) ) and ( not ( widget ) )
except that the conditions are all written in the form of tagset.condition, so you would need to put the name of the tag set containing these conditions in front of all of those (which you'll see in the example while you have Basic turned on).

Re: ORing and ANDing conditions

Posted: Fri Jan 29, 2016 2:59 am
by ChoccieMuffin
I ALWAYS have to check the Flare help for advanced conditions! But devjoe has summed up the principle correctly. Good luck, perservere, and bookmark the advanced conditions page in the help!

Re: ORing and ANDing conditions

Posted: Mon Feb 01, 2016 3:38 am
by oceanclub
Thanks all. I was hoping there was a way to avoid the advanced box; although my example only shows two version conditions and one other condition, in reality I have 5 version numbers (and rising) and about 10 other conditions. You can only imagine how byzantine the advanced conditions would be.


P.

Re: ORing and ANDing conditions

Posted: Fri Apr 07, 2017 12:33 pm
by the documentator
For me, I have created combined conditions. I have a project with two different supported OSs each OS has two supported versions. This is a Linux example. RedHat vs SUSE.

Inside the topic:
I have a tag for a specific OS and version (RedHat6, RedHat7, SUSE11, SUSE12).
I also have a combined tag where two versions have the same info (RH6SUSE11, RH7SUSE12)

I also have a tag for information not applicable for SUSE11 at all but applies to the other 3 conditions (noSUSE11).

When generating the RedHat 6 guide, I enable the RedHat6, RH6SUSE11, and noSUSE11 tags.
Whereas for the SUSE 11 guide, I enable the SUSE11 and RH6SUSE11 tags and disable the noSUSE11 tag.

Re: ORing and ANDing conditions

Posted: Fri Apr 07, 2017 12:56 pm
by the documentator
I have another project (different company) where I have multiple sites who need the documentation, but it needs to be customized for the site.

My Flare project has the information for every combination.

Here what I did:
  • I created separate conditional tag sets. One to list the different sites; one to list the different components.
  • I then created a topic with a table to describe which conditions are used for which sites. (I also add needed syntax to paste into the Advanced section at the bottom of the Conditional Text panel)
When when I go to publish the documentation, I simply copy and paste the syntax for the site I am generating documentation.
Alternatively, you can create separate target and destination for each site and then just apply the conditions for the different components for that specific site's target.