View Single Post
  #2  
Old June 3rd, 2019, 09:07 AM
ScottHillock ScottHillock is offline
Regular Contributor
 
Join Date: Mar 2010
Posts: 91
Default Re: OnRecordStart Execution

On your VARIABLE8 you're missing the Field part. Also, I'm not sure if it might have slipped your mind, but in your if statement there needs to be a condition on each pair. So, just having the == "" on the last pair doesn't apply to all of them. But, if you're just looking to see if the field contains anything then you're ok, unless those fields might include a 0. Also, it's composeThisRecord and not ComposeThisRecord. You don't really need the else statement either.

Might also just be personal preference, but I'm not a fan of the multiple if checks. But, here is how I would do it.

Code:
var arr = [
Field("VARIABLE1"), 
Field("VARIABLE2"), 
Field("VARIABLE3"), 
Field("VARIABLE4"), 
Field("VARIABLE5"), 
Field("VARIABLE6"),
Field("VARIABLE7"),
Field("VARIABLE8"),
Field("VARIABLE9"),
Field("VARIABLE10"),
Field("VARIABLE11"),
Field("VARIABLE12"),
Field("VARIABLE13"),
Field("VARIABLE14")
];

var combined = arr.filter(String).join("");

if(combined === ""){
  FusionPro.Composition.composeThisRecord = false;
}
__________________
FusionPro 9.3.36 - Acrobat 11 - macOS 10.14
Reply With Quote