View Single Post
  #1  
Old June 3rd, 2019, 07:53 AM
AWhite2504 AWhite2504 is offline
Junior Community Member
 
Join Date: May 2019
Posts: 17
Default OnRecordStart Execution

Hello,

I am a newbie will little Javascript training. I am setting up a template that has two pages; one being a welcome and thank you letter and the second being a material request. The document only needs to be printed if there are actual requests in variables 1-14. If one of those fields are populated the document will be printed.

Upon composing all records are being composed, instead of just the records with material requests.


if(Field("VARIABLE1") || Field("VARIABLE2") || Field("VARIABLE3") || Field("VARIABLE4") || Field("VARIABLE5") || Field("VARIABLE6") ||Field("VARIABLE7")||("VARIABLE8") || Field("VARIABLE9") || Field("VARIABLE10") || Field("VARIABLE11") || Field("VARIABLE12") || Field("VARIABLE13") ||Field("VARIABLE14")!="")

FusionPro.Composition.ComposeThisRecord = true

else

if(Field("VARIABLE1") || Field("VARIABLE2") || Field("VARIABLE3") || Field("VARIABLE4") || Field("VARIABLE5") || Field("VARIABLE6") ||Field("VARIABLE7")||("VARIABLE8") || Field("VARIABLE9") || Field("VARIABLE10") || Field("VARIABLE11") || Field("VARIABLE12") || Field("VARIABLE13") ||Field("VARIABLE14")=="")

FusionPro.Composition.ComposeThisRecord = false;
Reply With Quote