You should be able to look in the composition log (.msg) file and see if
there are any warnings about the page usage.  You might just have a typo
in the page name.

If this logic works for the front pages:

  FusionPro.Composition.SetBodyPageUsage(Field("spanish"), true);

Then I would think that something like this would work for the back
pages:

  FusionPro.Composition.SetBodyPageUsage(
                       "FRONT" + Field("spanish"), true);

So, yes, you can give the pages names that match the field values and
write rules like that.  However, you might want to account for a case
where the value is something else besides "YES" or "NO" (in whatever
capitalization).  Therefore I still think an if/else statement is best,
so that you always get some pages out, even if the field value is not
what you're expecting.

So again, I would probably give the pages more meaningful names and use
some logic like this:

  // Convenience function
  function ActivatePage(pageName)
  {
    FusionPro.Composition.SetBodyPageUsage(
                              pageName, true);
  }

  if (ToLower(Left(Field("SPANISH"), 1)) == "y")
  {
    ActivatePage("SpanishFront");
    ActivatePage("SpanishBack");
  }
  else
  {
    ActivatePage("EnglishFront");
    ActivatePage("EnglishBack");
  }

If you still don't think you're getting the right pages, you can always
add some debugging logic to the rule, like so:

  if (ToLower(Left(Field("SPANISH"), 1)) == "y")
  {
    Print("Using Spanish pages");
    ActivatePage("SpanishFront");
    ActivatePage("SpanishBack");
  }
  else
  {
    Print("Using English pages");
    ActivatePage("EnglishFront");
    ActivatePage("EnglishBack");
  }

The Print function will output messages to your composition log (.msg)
file.  If you use it like in the example above, then any warnings about
page usage will directly follow the message from the Print call, which
should make it easy to determine where the page name mismatch is
occurring.  Once you have everything working, you can comment out the
debugging Print statements if you want.

Dan


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to