Mary,
Actually, it can be accomplished much easier. Turn all of your body pages
named sid1, sid2, etc. to be unused (you can do this in FusionPro >
ManagePages). Then replace all of the code you created in the OnRecordStart
rule (that you pasted in your email below) with the following code:
for(x=1;x<=Field("NumberOfPages");x++)
{
FusionPro.Composition.SetBodyPageUsage("sid"+x, 1);
}
This should give you the functionality you are looking for.
-Lauren
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2008 3:55 AM
To: FusionPro Users Forum
Subject: [fusionpro] SetBodyPageUsage
I've been trying to build a rule that, will take the value of a user input
field called "NumberOfPages" and then set body page usage to "on" for
those pages in range. I have a twelve-page document where every page is
named "sid1", "sid2" etc, and the user is to be able to choose how many of
these pages should be composed - any number between 1-12. (I've put this
rule in the mode "OnRecordStart").
This is the function I've built:
var nrOfPages = Field("NrofPages");
var startCommand = 'FusionPro.Composition.SetBodyPageUsage("sid';
var endCommand = '", 1);'
var s = '';
for (c = 1; c <= nrOfPages; c++) {
var result = startCommand+c+endCommand;
s += result+"\n";
}
return s;
If Field("NrofPages") is set to "3" for example, this function returns:
FusionPro.Composition.SetBodyPageUsage("sid1", 1);
FusionPro.Composition.SetBodyPageUsage("sid2", 1);
FusionPro.Composition.SetBodyPageUsage("sid3", 1);
So far so good, right?
The problem is that when I validate this rule, I get the following
message:
-------------------------------------------
Expressions OK
Return value (ignored at composition time):
FusionPro.Composition.SetBodyPageUsage("sid1", 1);
FusionPro.Composition.SetBodyPageUsage("sid2", 1);
FusionPro.Composition.SetBodyPageUsage("sid3", 1);
------------------------------------------
In other words, at composition, only "sid1" is composed.
What am I doing wrong? Please help me!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
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
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
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
--