Hi,
I try to write a rule but nothing seems to work properly…
In a 8 pages document, we use 2 choices successively ("in cascade") that validate the creation of a 2 or a 3 pages final downloadable document.
first choice :
Option 1 eliminate pages 1 / 2 / 3 / 4 (pages 5 / 6 / 7 / 8 are used)
Option 2 eliminate pages 5 / 6 (pages 1 / 2 / 3 / 4 / 7 / 8 are used)
Then choice 2 comes to eliminate half of the resulting pages :
First case : page 5 / 7 (pages 8 / 6 are used) or 6 / 8 (pages 1 / 3 are used) then we have our 2 pages final document.
Second case : 1 / 3 / 7 (pages 2 / 4 / 8 are used) or 2 / 4 / 8 (pages 1 / 3 / 7 are used) then we have our 3 pages final document.
I tried this :
----------------------------------------------------------------------------------------
if (Field("flux")=="Bi flux")
{
FusionPro.Composition.SetBodyPageUsage("Corps 1", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 2", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 3", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 4", false);
}
if (Field("flux")=="Tri flux")
{
FusionPro.Composition.SetBodyPageUsage("Corps 5", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 6", false);
}
if (Field("logo-2")=="")
{
FusionPro.Composition.SetBodyPageUsage("Corps 2", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 4", false);
} {
FusionPro.Composition.SetBodyPageUsage("Corps 6", false);
}
{
FusionPro.Composition.SetBodyPageUsage("Corps 8", false);
}
-----------------------------------------------------------------------------
But when trying to validate the rule, I have the error message "Function returns no value" or "No value returned" (I use a french version of FusionPro…)
If someone could tell where I am wrong (or so stupid !), I would be grateful.
Gerard.