AWhite2504 Posted July 21, 2021 Share Posted July 21, 2021 I am trying to use onrecordstart to only compose VA,NJ records. if(Field("ST")!="VA"|"NJ") FusionPro.Composition.composeThisRecord = true; My output only shows VA. Can onrecordstart be used for multiple instances? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted July 21, 2021 Share Posted July 21, 2021 Sure, like this: if (Field("ST") == "VA" || Field("ST") == "NJ") FusionPro.Composition.composeThisRecord = true; Or: switch (Field("ST")) { case "VA": case "NJ": FusionPro.Composition.composeThisRecord = true; break; } Or: FusionPro.Composition.composeThisRecord = (Field("ST") == "VA" || Field("ST") == "NJ"); Or: FusionPro.Composition.composeThisRecord = ["", "VA", "NJ"].indexOf(Field("ST"); Or: FusionPro.Composition.composeThisRecord = "^(VA|NJ)$".match(Field("ST"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.