Advanced conditions on an import file

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Advanced conditions on an import file

Post by ChoccieMuffin »

I'm confused with my advanced conditions in an import file when using global project linking. Here's the situation:

I have a "child" project called RV that produces its own output and is also imported into four other projects.

In my Content Explorer I have 3 folders containing RV_Images, RV_Topics and RV_Snippets, some of which I want to import into all four target projects - FORMS, PP, PE and AP - some just into one or other of the target projects. I also have other stuff, in other folders, imported from my globals project that I don't want to include in any other import.

In that project I have a condition tag set called, unsurprisingly, RV.flcts. It has the following conditions:
RV.RV (generic "needs to be included in an import" condition, applied to all topics that need to be included in all imports into other projects, and also to some bits in the Project Organizer such as TOCs and RV.flcts)
RV.FORMS_Only (only for the FORMS project, applied in addition to RV.RV)
RV.PP_Only (etc)
RV.PE_Only
RV.RVOnly (not exported to another project, used only for the target built from the RV project. This condition is only applied to content inside topics, not to files.)
RV.AP_Only

When doing an import into a target project (for example the FORMS project) I want to include everything conditioned as RV.RV or RV.FORMS, except if it's also formatted with RV.PE, RV.RV, RV.PP or RV.AP.
If I use the BASIC editor and select Include RV.RV and exclude the ones I don't want, the INCLUDE trumps the EXCLUDES, so I have to use the Advanced Editor, but I can't get my import files to do what I need them to do.

I have a lasting confusion with advanced conditions, so I'd really appreciate someone getting into my thinking and sorting my head out (as far as advanced conditions go, obviously - you'd have a hard job trying to sort out the rest of my head!)

This is the text of the import file:

Code: Select all

<CatapultProjectImport
  AutoSync="true"
  IncludePattern="*.htm;*.html;*.flcts;*.png;*.bmp;*.jpg;*.fltoc;*.flsnp"
  ConditionTagExpression="include[ RV.RV or RV.FORMS_Only and not ( Primary.Globals or ( RV.RV and RV.PP_Only ) or ( RV.RV and RV.PE_Only ) or ( RV.RV and RV.RVOnly ) or (RV.RV and RV.AP_Only ) )]"
  AutoExcludeNonTaggedFiles="true"
  DeleteStale="true"
</CatapultProjectImport>
My problem is that everything is included in the import, so that second bit after "and not" isn't doing what I want it to do.

Any and all suggestions very welcome, thanks!
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
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Advanced conditions on an import file

Post by ChoccieMuffin »

After a bit more digging and playing around, I think I've identified the solution but thought I'd leave the thread here, just in case anyone else comes across the same thing.

Who knew the ORDER of things you include in the ConditionTagExpression line makes a difference!

When the order of the first bit is "include[ RV.RV or RV.FORMS_Only and not..." (i.e., the condition applied to everything first) then everything comes in. When the order is "include[ RV.FORMS_Only or RV.RV and not" (i.e. the sub-set first) then I get the result I want!

Think I feel a bug report coming on!
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
Post Reply