Conditional text as a selective inclusion

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
PoolMan
Jr. Propeller Head
Posts: 3
Joined: Tue Oct 16, 2018 2:32 pm

Conditional text as a selective inclusion

Post by PoolMan »

Hi all! Working on a PDF output document from an existing multi output group of topics (have already created a PDF and online outputs from these topics).

I want to create a subset of the original PDF by using conditional text. Not sure how best to apply the filters and logic.

Use case:

I have a set of topics that feed into a PDF called Release Notes, which has been running for years. I would like to create a new PDF called What's New, which is a curated subset of the Release Notes.

SOME of the Release Notes are candidates for What's New, but not all of them. The technician in charge of writing the actual content decides which entries are to be included.

I would like to separate these out by quarter and year so I can create a quarterly What's New document and distribute it, but I can't come up with a way to tag the existing entries for selective inclusion.

For instance, if I wanted to create a report for Q1 2018, I would like to have ONLY the entries tagged "Q1 2018" appear in the report, and exclude all others.

Thoughts? I feel like it's something simple but I'm not coming up with it.

Could it work to exclude the entire topic, and then include the individual entries?

Many thanks!
Sean
AlexFox
Sr. Propeller Head
Posts: 159
Joined: Thu Oct 19, 2017 1:56 am

Re: Conditional text as a selective inclusion

Post by AlexFox »

I can't exactly grasp what you're trying to do, but it's important to bear in mind the mechanics of conditional text.

If you (for example) apply a conditional tag to your <body> element and exclude it, then nothing inside the body element will be included, even if you specifically check the include box in your target.

Essentially, just ensure that whatever tags you're using to exclude/include are at the same hierarchical level.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditional text as a selective inclusion

Post by ChoccieMuffin »

PoolMan wrote:Hi all! Working on a PDF output document from an existing multi output group of topics (have already created a PDF and online outputs from these topics).

I want to create a subset of the original PDF by using conditional text. Not sure how best to apply the filters and logic.

Use case:

I have a set of topics that feed into a PDF called Release Notes, which has been running for years. I would like to create a new PDF called What's New, which is a curated subset of the Release Notes.

SOME of the Release Notes are candidates for What's New, but not all of them. The technician in charge of writing the actual content decides which entries are to be included.

I would like to separate these out by quarter and year so I can create a quarterly What's New document and distribute it, but I can't come up with a way to tag the existing entries for selective inclusion.

For instance, if I wanted to create a report for Q1 2018, I would like to have ONLY the entries tagged "Q1 2018" appear in the report, and exclude all others.

Thoughts? I feel like it's something simple but I'm not coming up with it.

Could it work to exclude the entire topic, and then include the individual entries?

Many thanks!
Sean
I'm a bit confused by your use of the word "entries" - are these paragraphs within a topic or individual topics? Also confused by your last line: "Could it work to exclude the entire topic, and then include the individual entries?"

In case this is of some use, I'll mention how I would probably approach it.

"Entries" should be individual topics that are included in the TOC for the Release Notes output. (Don't know if this would mean you'd have to do some rework in your Release Notes project though.)
Apply condition tags to the topics relating to their release numbers: Q1-2018, Q2-2018 etc.
In your Q1 2018 target, INCLUDE the Q1-2018 condition and EXCLUDE all other conditions. What this means is that anything conditioned with Q1-2018 AND Q2-2018 will appear, as INclude trumps EXclude.

If you have content inside a topic that you DON'T want to include in your output then it has to have a condition applied to it that you can then exclude in your topic, as anything that doesn't have a condition is automatically INCLUDED. So you can't EXCLUDE a topic and then expect bits from inside that topic to appear as you've already said that the entire topic should be excluded.

Does that help?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
PoolMan
Jr. Propeller Head
Posts: 3
Joined: Tue Oct 16, 2018 2:32 pm

Re: Conditional text as a selective inclusion

Post by PoolMan »

Thanks for the responses so far, much appreciated.

You're right, I wasn't clear enough in my request. By "entries" I meant paragraphs inside a topic. So if a given topic contains paragraph A, B, C, and D, I would want to extract paragraphs A and D for my What's New.

But I'm hearing the thought I was afraid of - there would have to be some excluding tag as well as the including tag. Sound correct?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditional text as a selective inclusion

Post by ChoccieMuffin »

If you've got lots of stuff in a single topic that you don't want to include in your output then it has to be given a condition tag so you can exclude it because unconditioned stuff is always included by default, there isn't a way to produce something that is ONLY the conditioned stuff.

How many releases are you going to want to produce a "What's New in Release Qx 20XX" for? I'm assuming you won't want to go back any further than, say, Q1 2018.

This might not work in your workflow, depending on how detailed and complicated your release notes are, but you might want to approach it this way.

1. Create conditions for Q1 2018, Q2 2018 etc. Also create a condition called "Pre-2018" or similar.
2. Work through your Release Notes topic and apply the relevant conditions to each paragraph. If there is any text in the release note that you want to always include (like an introductory paragraph or that kind of thing) then don't apply any condition.
3. Create a new target for each What's New output. So for a "Q1-2018" document INCLUDE "Q1-2018" and EXCLUDE all the others. Take the same approach with other quarters.
4. When a new quarter is happening, create a new condition and apply that condition to the bits you're adding as you go, and create a new target that includes that condition.


Here's a warning from the Flare help that you need to keep in mind when working with conditions:
"Warning: If you do not select any check boxes at all, all of the tags will automatically be included. If you include only some tags and exclude others, any remaining tags without check marks for either Include or Exclude will automatically be included. However, if you select Include for any of the tags (even just one) and do not select Exclude for any tags, all of the other tags that do not have Include check marks will automatically be excluded. If you want to be safe and always know that the correct tags are included or excluded, you can make sure that all of the tags have check marks with either Include or Exclude."

Obviously if your Release Notes topic is massive this could be a mare of a job, but it would only need to be done once.

There are many approaches you could take, this is just one suggestion. But without knowing your project I'm loathe to make any further suggestions.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
PoolMan
Jr. Propeller Head
Posts: 3
Joined: Tue Oct 16, 2018 2:32 pm

Re: Conditional text as a selective inclusion

Post by PoolMan »

Thank you for that reply! Your assumptions are correct, or certainly close enough that they apply.

It was the conclusion I was rapidly reaching anyway, but I hoped that the good folk here might know more than me (a highly likely event).

The reason I was hoping to include date codes in the tagging was so that we could custom tailor What's New documents for different customers as they migrated forward from whatever version of our software they were on to the newest version. All we would need to do is specify the date range to include.

The technician who would be in charge of all the tagging has mysteriously lost enthusiasm for the project... :lol:

Great info - thanks again!
Post Reply