MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   Getting Started, Learning, Etc. (http://forums.pti.com/forumdisplay.php?f=38)
-   -   OnRecordStart Issue (http://forums.pti.com/showthread.php?t=10586)

AWhite2504 July 21st, 2021 10:38 AM

OnRecordStart Issue
 
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?

Dan Korn July 21st, 2021 01:33 PM

Re: OnRecordStart Issue
 
Sure, like this:
Code:

if (Field("ST") == "VA" || Field("ST") == "NJ")
    FusionPro.Composition.composeThisRecord = true;

Or:
Code:

switch (Field("ST"))
{
    case "VA":
    case "NJ":
        FusionPro.Composition.composeThisRecord = true;
        break;
}

Or:
Code:

FusionPro.Composition.composeThisRecord = (Field("ST") == "VA" || Field("ST") == "NJ");
Or:
Code:

FusionPro.Composition.composeThisRecord = ["", "VA", "NJ"].indexOf(Field("ST");
Or:
Code:

FusionPro.Composition.composeThisRecord = "^(VA|NJ)$".match(Field("ST");


All times are GMT -7. The time now is 07:30 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.