Page 1 of 1

Flare's logic in case of multiple conditions on same content

Posted: Wed Aug 12, 2009 7:34 am
by Joost
Hi,

I did some testing on multiple condition tags on the same content and I am puzzled by the logic.

Suppose I have two conditions (condition 1 and condition 2) and the classic printonly and onlineonly conditions. Suppose I always exclude condition 2.

I include condition 1, I include screenonly and I exclude printonly in the online target. This is what I get:
- Text with condition 1 is displayed, except for printonly, which is ok.
- Text for condition 2 however, is displayed for the ones that also have the screenonly tag.

This is not what I want. Everyting with condition 2 should be excluded because the condition 2 is excluded. If I go into the Target designer, I see only OR statements on the Conditions tab, no AND statements. Is this a bug or is this designed this way? Or am I missing anything?

And how should I solve my problem?

All help appreciated,

Joost

Re: Flare's logic in case of multiple conditions on same content

Posted: Wed Aug 12, 2009 7:54 am
by royj
Joost,
I discovered the same thing: Overlapping conditions doesn't do what you want it to. I ended up creating things like:
  • Condition1_PrintOnly
  • Condition1_ScreenOnly
  • Condition2_PrintOnly
  • Condition2_ScreenOnly
But that gets ugly as you add more conditions, and I'm trying to avoid it as much as possible. Unfortunately, I don't know of a better work-around.

Re: Flare's logic in case of multiple conditions on same content

Posted: Wed Aug 12, 2009 9:37 am
by RamonS
By design, an include overrides any exclude and no tagging is interpreted as include. Sure, could have been done the other way around, but it would just create other problems.

Re: Flare's logic in case of multiple conditions on same content

Posted: Tue Aug 18, 2009 2:25 pm
by KevinDAmery
RamonS wrote:By design, an include overrides any exclude and no tagging is interpreted as include. Sure, could have been done the other way around, but it would just create other problems.
To put it another way, in Flare the only purpose of an explicit Include condition is to over-ride an Exclude condition.

Re: Flare's logic in case of multiple conditions on same content

Posted: Tue Aug 18, 2009 4:37 pm
by RamonS
Nicely put!

Re: Flare's logic in case of multiple conditions on same content

Posted: Wed Aug 26, 2009 3:17 am
by Judith
One useful technique is to group topics together in a folder and apply an exclude condition at folder level and an include condition at topic level.

It's a handy way of building a specific target that has a relatively small number of topics from the project.

Re: Flare's logic in case of multiple conditions on same content

Posted: Sat Aug 29, 2009 1:24 pm
by Paul Griffiths
As others have pointed out, if Condition_A and Condition_B are both applied to the same content, then whichever is included always "wins".

There is a sort of a workaround, but it's useful only if, for a particular piece of content, you know for sure that (a) you're going to specify both conditions and (b) you always want Condition_A to override Condition_B.

In other words, you are sure that even if Condition_B is included, if Condition_A says it's excluded, then it's out!

The trick is in the words "applied to the same content" above.

Suppose it's a paragraph. You apply Condition_A to the <p> tag. Then you put a <span> tag around all the content in the paragraph. Apply Condition_B to the <span>, but with an exclude action of "Unbind".

A quick test confirms that this seems to work, at least in the simple case described above.