andym Posted April 1, 2013 Share Posted April 1, 2013 I am trying to write a rule where the user must meet two or more conditions. My goal: If an extension is entered on either of the first two contact numbers, the third number will not be returned because of the amount of space the designer allowed. If they do not have extensions on the first two numbers, the third number will be returned. (below, 'Label3 RULE' is the third number formatted & with appropriate label). Below is one of several failed attempts which will hopefully portray my end goal: if (Field("Extension 1")||(Field("Extension 2")!=""); return ""; //else return Rule("Label3 RULE"); Should I be taking a different approach to achieving a specific return where multiple conditions must be met? Thank you, Andy Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 1, 2013 Share Posted April 1, 2013 The problem is the semicolon at the end of the first line: if (Field("Extension 1")||(Field("Extension 2")!="")[color=Red];[/color]That effectively provides an empty statement block for the "if" statement. So it has no effect, and the following line (which returns an empty string) is always executed, unconditionally. Remove that semicolon at the end of the first line and your rule will work fine. Quote Link to comment Share on other sites More sharing options...
andym Posted April 2, 2013 Author Share Posted April 2, 2013 That did it! All I had to do is remove the ; and added another ) at the end. Thank you for the explanation too. Andy 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.