Below is the current code.
switch (Field("LetterCode")) {
case "A1":
case "A2":
case "A3":
case "A6":
case "A7":
case "A8":
FusionPro.Composition.SetBodyPageUsage("A1", true);
var picTrue = FindTextFrame("Sig-A1");
var picFalse = FindTextFrame("NoSig-A1");
break;
case "A4":
case "A5":
FusionPro.Composition.SetBodyPageUsage("A4", true);
var picTrue = FindTextFrame("Sig-A4");
var picFalse = FindTextFrame("NoSig-A4");
break;
case "A11":
case "A12":
case "A13":
FusionPro.Composition.SetBodyPageUsage("A11", true);
var picTrue = FindTextFrame("Sig-A11");
var picFalse = FindTextFrame("NoSig-A11");
break;
case "B1":
FusionPro.Composition.SetBodyPageUsage("B1", true);
var picTrue = FindTextFrame("Sig-B1");
var picFalse = FindTextFrame("NoSig-B1");
break;
case "C1":
FusionPro.Composition.SetBodyPageUsage("C1", true);
var picTrue = FindTextFrame("Sig-C1");
var picFalse = FindTextFrame("NoSig-C1");
break;
case "D1":
FusionPro.Composition.SetBodyPageUsage("D1", true);
var picTrue = FindTextFrame("Sig-D1");
var picFalse = FindTextFrame("NoSig-D1");
break;
case "E1":
FusionPro.Composition.SetBodyPageUsage("E1", true);
var picTrue = FindTextFrame("Sig-E1");
var picFalse = FindTextFrame("NoSig-E1");
break;
default:
FusionPro.Composition.SetBodyPageUsage(Field("LetterCode"), true);
var picTrue = FindTextFrame("Sig-" + Field("LetterCode"));
var picFalse = FindTextFrame("NoSig-" + Field("LetterCode"));
}
if (StringToNumber(Field("Photo")) < StringToNumber("1"))
picTrue.suppress = true;
else picFalse.suppress = true;
I've changed the script at the bottom to identify if a number is present or not since the filename given in the data is "11111_1111.pdf" and not a full path. Trying to create a resource doesn't allow the suppression to work. All of the A1-A8 work but the remaining letters that DO NOT have a photo still use the frame that is for when a photo is there.
Thoughts?