ORing and ANDing conditions

This forum is for Single-Sourcing your Flare content to multiple outputs.

ORing and ANDing conditions

Postby oceanclub on Thu Jan 28, 2016 8:34 am

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.
User avatar
oceanclub
Sr. Propeller Head
 
Posts: 178
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

Re: ORing and ANDing conditions

Postby devjoe on Thu Jan 28, 2016 10:59 am

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).
devjoe
Sr. Propeller Head
 
Posts: 312
Joined: Thu Jan 23, 2014 1:43 pm

Re: ORing and ANDing conditions

Postby ChoccieMuffin on Fri Jan 29, 2016 2:59 am

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!
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2147
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: ORing and ANDing conditions

Postby oceanclub on Mon Feb 01, 2016 3:38 am

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.
User avatar
oceanclub
Sr. Propeller Head
 
Posts: 178
Joined: Thu Oct 10, 2013 4:45 am
Location: Dublin

Re: ORing and ANDing conditions

Postby the documentator on Fri Apr 07, 2017 12:33 pm

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.
the documentator
Jr. Propeller Head
 
Posts: 6
Joined: Thu Jan 08, 2015 4:50 pm

Re: ORing and ANDing conditions

Postby the documentator on Fri Apr 07, 2017 12:56 pm

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.
the documentator
Jr. Propeller Head
 
Posts: 6
Joined: Thu Jan 08, 2015 4:50 pm


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 2 guests