Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old October 23rd, 2012, 04:44 PM
juliazo juliazo is offline
Junior Community Member
 
Join Date: Jun 2012
Posts: 22
Exclamation Problem activating pages with SetBodyPageUsage

Hi again...

Trying to activate pages on demand, but the callback rule (OnJobStart) gives me an error message when composing:

OnJobStart, line 1: Error: In Field(), no data source defined or data could not be loaded

The data source is defined, as the composition itself works, it's just that the pages I want to activate/deactivate don't quite work as expected.

Here's my callback rule:

Quote:
if (Field("Style") == "A1")
{
if (Field("PageCount") == "8")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
}
if (Field("PageCount") == "16")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
FusionPro.Composition.SetBodyPageUsage("A1_2",true );
}
if (Field("PageCount") == "24")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
FusionPro.Composition.SetBodyPageUsage("A1_2",true );
FusionPro.Composition.SetBodyPageUsage("A1_3",true );
}
if (Field("PageCount") == "32")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
FusionPro.Composition.SetBodyPageUsage("A1_2",true );
FusionPro.Composition.SetBodyPageUsage("A1_3",true );
FusionPro.Composition.SetBodyPageUsage("A1_4",true );
}
if (Field("PageCount") == "40")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
FusionPro.Composition.SetBodyPageUsage("A1_2",true );
FusionPro.Composition.SetBodyPageUsage("A1_3",true );
FusionPro.Composition.SetBodyPageUsage("A1_4",true );
FusionPro.Composition.SetBodyPageUsage("A1_5",true );
}
if (Field("PageCount") == "48")
{
FusionPro.Composition.SetBodyPageUsage("A1_1",true );
FusionPro.Composition.SetBodyPageUsage("A1_2",true );
FusionPro.Composition.SetBodyPageUsage("A1_3",true );
FusionPro.Composition.SetBodyPageUsage("A1_4",true );
FusionPro.Composition.SetBodyPageUsage("A1_5",true );
FusionPro.Composition.SetBodyPageUsage("A1_6",true );
}
}

I essentially have two fields that drive my page count: "Style" (could be one of three options, the code above is for the first option only), and "PageCount" (could be one of 6 options, "8", "16", "24", etc). My goal is to have the double condition activate pages 1-6 on demand, but I get that error message whenever I try to compose, and all pages come out in my composition. Any suggestions..?

Thanks!
Reply With Quote
 

Tags
callback, error, rule, setbodypageusage

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.