Skip to main content
Participant
December 17, 2013
Question

How to Handle Overlapping Conditions?

  • December 17, 2013
  • 1 reply
  • 708 views

Hello All!

I'm using unstructured FM11.

Suppose I have the following conditional tags:

- Audience_Developers

- Audience_Marketing

- Audience_Techwiters

- Product_A

- Product_B

In an FM document, I have two tables. Each table contains 10 rows. I applied the conditional tags to the first table as follows:

- Product_A tag is applied to the entire table

- Audience_Developers is applied to to one row. So this row is tagged Product_A+Audience_Developers.

- Audience_Marketing is applied to to one row. So this row is tagged Product_A+Audience_Marketing.

- Audience_Techwiters is applied to to one row. So this row is tagged Product_A+Audience_Techwriters.

I applied similar conditions to the second table as follows:

- Product_B tag is applied to the entire table

- Audience_Developers is applied to to one row. So this row is tagged Product_B+Audience_Developers.

- Audience_Marketing is applied to to one row. So this row is tagged Product_B+Audience_Marketing.

- Audience_Techwiters is applied to to one row. So this row is tagged Product_B+Audience_Techwriters.

I want to show only the content for Product_A for Audience_Developers. If I do it via Show per Condition and define that I want to hide Product_B, Audience_Marketing, and Audience_Techwriters, nothing is hidden from the first table. I even understand why: the  rows tagged with Audience_Marketing and Audience_Techwriters are also tagged with Product_A, which is set to Show.

I thought that maybe it can be done with conditional expressions, but not sure how exactly.

Any advice is greatly appreciated.

Thank you very much!

This topic has been closed for replies.

1 reply

Arnis Gubins
Inspiring
December 17, 2013

If you're using the old FM conditional text approach, then that will hide content and uses a logical OR model. The conditional expression approach does the opposite - it only shows what you ask it to (of the tagged conditional content).

When you say that a conditional tag is applied to the whole table, how exactly are you doing this (tagging each row or the table anchor)?

If you've tagged the table anchors only then to show just the Product_A and the Audience_Developers row you would need tto use thee following relational expression:

"TableA"OR"Developers"   <-- note that it is "OR"; if you used the "AND", then every row in the table would have to be agged with the TableA condition.

biker_jrAuthor
Participant
December 18, 2013

Hi Arnis,

Thank you.

To apply the "ProductA" conditional tag, I just selected the entire table and in the Conditional Tag pane, clicked Apply. FM asked me if I want to apply the condition to all rows in the table, and I said "yes". I can see that every row is now colored, and the status bar for each row says "ProductA".

For the three audience-specific rows, the status bar says Product_A+Audience_Developers, Product_A+Audience_Marketing, Product_A+Audience_Techwriters correspondingly.

Suppose I want to show all products (that is both tables) with the rows intended for Developers and hide the rows for Marketing and Techwriters, I built the following expression:

"ProductA"AND"ProductB"AND"Audience_Development"

When I apply this expression, eveything in the document disappears.

Am I doing anything wrong? (Well, I guess I do, just need to figure out what exactly ;-))

Thanks!

Arnis Gubins
Inspiring
December 18, 2013

You have to look at the Boolean logic being used. With the AND connector all components must be true in order for the expression to evaluate to true. So this will only show where *all three* conditions overlap. Since Product A and Product B are in separate tables, then it never happens and hence FM doesn't show those conditional items. Again, you would need to use the OR condition.

Also, if you want to make an entire table conditional, it's better to apply the condition to the table anchor (which is easy to do if you use a special-purpose paragraph tag to only hold the anchors) rather than the table itself. Same goes for anchored frames.