I haven't tried this so let me know if you have any luck or problems.

_______________________________________________________________
if (Rule("ModelYear") == "1990" || Rule("ModelYear") == "1991")
   return "4cylinder";


if (Rule("ModelYear") >= "1992" && Rule("ModelYear") <= "1995")
{
        if (Field("Field10") == "6")
                return "";
        if (Field("Field10") >= "0" && Field("Field10") <= "9")
                return ("4cylinder");
}


if (Rule("ModelYear") >= "1992" && Rule("ModelYear") <= "1995")
{
        if (Field("Field10") == "3")
                return ("6cylinder");
}


if (Rule("ModelYear") >= "1996" && Rule("ModelYear") <= "2007")
{
        if (Field("Field10") == "8")
                return ("6cylinder");

        if (Field("Field10") >= "0" && Field("Field10") <= "9")
                return ("4cylinder");
}
else return ""
____________________________________________________________

Doug Pershing
VP-Data & Production
WMSG Inc
1278 Titan Dr
Dallas, TX 75247
(214) 640-2224
e-mail [EMAIL PROTECTED]
web http://wmsginc.com
click on information and news to see the latest at WMSG Inc.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 20, 2007 8:10 AM
To: FusionPro Users Forum
Subject: [fusionpro] JavaScript Help

Hello all....

Following is a script I'm trying to determine wheter are car is a 4
cylinder or 6 cylinder.  I'm have to compare two fields, one with the
model year and the second is engine type.  I'm getting a syntax error on
the following code:

if ((Rule("ModelYear")) == 1990,1991) {
   return "4cylinder"
}
if ((Rule("ModelYear")) == 1992,1993,1994,1995) && 
((Field("Field10")) == 1,2,3,4,5,7,8,9,0){
   return ("4cylinder")
}
if ((Rule("ModelYear")) == 1992,1993,1994,1995) &&
((Field("Field10")) == 3) {
   return ("6cylinder")
}
if ((Rule("ModelYear")) ==
1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007) &&
((Field("Field10")) == 1,2,3,4,5,6,7,9,0) {
   return ("4cylinder")
}
if ((Rule("ModelYear")) ==
1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007) &&
((Field("Field10")) == 8) {
   return ("6cylinder")
}
else
{
return ""
}

Can someone please help me get this code formatted in the correct syntax.

Thanks,

Franklin Miller
Catawba Print & mail

--

Users of FusionPro Desktop have unlimited free email support. Contact
Printable Support at [EMAIL PROTECTED] 
--

View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--

To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--

--




--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED] 
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to