Reusing a table using conditions

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
RJP_Home
Jr. Propeller Head
Posts: 6
Joined: Wed Feb 17, 2021 8:33 pm

Reusing a table using conditions

Post by RJP_Home »

I've inherited a PDF-output project. One of the topics has a long table that contains information about Product A, Product B, and Product C. I would like the output to look something like this:

Chapter 1: Stuff
Chapter 2: More stuff
Chapter 3: Product A table
Chapter 4: Product B table
Chapter 5: Product C table
Chapter 6: More stuff

I've gone through the tedious step of applying the appropriate conditions to each of the table rows, e.g., Product A only, Product A and B, All Products, etc. Is there a way to set up the TOC, target, and conditions so that one topic is repeated in the output, once for each product containing only the information relevant to that product? If I condition the topic in the TOC, the entire topic will be included or excluded, depending on the settings in the target, correct? Snippet conditions could work, but table rows cannot be made into snippets, can they?
Psider
Propellus Maximus
Posts: 784
Joined: Wed Jul 06, 2011 1:32 am

Re: Reusing a table using conditions

Post by Psider »

I think you'd make the entire table a snippet, then insert that snippet into 3 topics, one for each product, applying the correct snippet conditions for each.
robdocsmith
Sr. Propeller Head
Posts: 231
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Reusing a table using conditions

Post by robdocsmith »

I'm not sure I'm understanding your goals correctly...

If you want to output a manual just for Product A, a manualjust for Product B and a third manual for Product C:
Create three conditions, one for each product
Create three targets, one for each product
Set conditions in each target to include the relevant product and exclude the others (one per separate product)
Create a single chapter for the overall table that includes all potential rows
Conditionalise individual rows for the products they apply to
When you generate the target output for Product A, only the table rows for Product A will be included (and any that are not conditionalised of course). Include overrides Exclude, so those rows conditionalised for both Product A and B will be included for Product A target, even though Product B might be excluded in the target.

If you want to output a manual that includes three chapters, one for each of Product A, B and C:
This is more complicated and I'd probably try to structure the table such that it was easy to make the generic rows into snippets and then add unconditioned rows for each product into the three separate versions of the table. If the target includes all three products, there's no way of turning on Product A conditions for the Product A chapter, Product B conditions for the Product B chapter etc. The command to include/exclude comes from the target.

Hope that makes sense!

Rob
RJP_Home
Jr. Propeller Head
Posts: 6
Joined: Wed Feb 17, 2021 8:33 pm

Re: Reusing a table using conditions

Post by RJP_Home »

Thanks for the input from both of you (and rob, your second option is what I'm trying to do), much appreciated.
How do I make individual table rows or the whole table into a snippet? Whenever I select either a row or the whole table, the Create Snippet option on the ribbon becomes inactive.
robdocsmith
Sr. Propeller Head
Posts: 231
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Reusing a table using conditions

Post by robdocsmith »

I've not done it myself but Flare has all sorts of wonderful things you can do if you're prepared to break away from the interface. I think this post: viewtopic.php?t=25936 explains how to do this.

Rob
robdocsmith
Sr. Propeller Head
Posts: 231
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Reusing a table using conditions

Post by robdocsmith »

Ahh I should have read on further in that link... sorry...

In which case, the only thing I can think of is to split the table into complete table sections. So instead of a single table, have several tables. Then the common ones could be snippets and the ones pertaining to particular products can be inserted between them where you need them.

Not elegant I know...
robdocsmith
Sr. Propeller Head
Posts: 231
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Reusing a table using conditions

Post by robdocsmith »

I think PSider is right. I'll have to look at Snippet Conditions more myself as I've not used them.
viewtopic.php?t=10427

Seems you can create an overall table with conditionalised rows as a snippet, then apply snippet conditions on the table snippet when you insert it into the three product topics. Those snippet conditions should control how the snippet is displayed, overriding the target conditions.

Sorry for leading you away from the right path!
RJP_Home
Jr. Propeller Head
Posts: 6
Joined: Wed Feb 17, 2021 8:33 pm

Re: Reusing a table using conditions

Post by RJP_Home »

Snippet conditions are awesome. Once I figure out how to make a table a snippet, I'll probably go that route.
Thanks again.

[Apparently one just creates a snippet and then pastes in the table. Easy.]
Post Reply