View Single Post
  #1  
Old February 12th, 2018, 10:52 AM
traba5058 traba5058 is offline
Regular Contributor
 
Join Date: Jan 2012
Location: Atlanta, GA
Posts: 77
Post Javascript Syntax Error - FusionPro

I have a rule that looks at 2 fields to determine what to return.

I'm getting a Javascript syntax error message on the following rule and for the life of me, I do not see it.

Code:
if ((Rule("RuleEmailFirstName") != "") && Rule("RuleEmailLastName") != ""))
return Rule("RuleEmailFirstName") + "." + Rule("RuleEmailLastName") + "@" + Field("Email Domain");
else if ((Rule("RuleEmailFirstName") != "") && (Rule("RuleEmailLastName") == ""))
return Rule("RuleEmailFirstName") + "@" + Field("Email Domain");
else if ((Rule("RuleEmailFirstName") == "") && (Rule("RuleEmailLastName") != ""))
return Rule("RuleEmailLastName") + "@" + Field("Email Domain");
else
return "";
Will someone please help me and point out what I'm doing wrong?
Reply With Quote