andym Posted March 10, 2015 Share Posted March 10, 2015 This is probably way easier than I am making it... My end goal is to have a rule where if the location chosen is on of three places it returns nothing, otherwise it returns a rule. Here is what I started with, and it worked: if (Field("Location") == ("NC")) return ""; else return Rule("Aufofill Rule"); What we need is for NC, IL or CA to return nothing. All other choices return a rule with formatted addresses based on their choice (Autofill Rule). I thought || was equal to "or", so I tried this rule: if (Field("Location") == ("NC") || if (Field("Location") == ("IL") || if (Field("Location") == ("CA")) return ""; else return Rule("Aufofill Rule"); Am I on the right track? Thanks for any input on how to make this work. -Andy Quote Link to comment Share on other sites More sharing options...
dreimer Posted March 10, 2015 Share Posted March 10, 2015 Try this: if ((Field("Location") == "NC") || (Field("Location") == "IL") || (Field("Location") == "CA")) return ""; else return Rule("Aufofill Rule"); Couple extra parenthesis and don't need the extra "ifs" Quote Link to comment Share on other sites More sharing options...
andym Posted March 10, 2015 Author Share Posted March 10, 2015 This works perfectly! Thank you!! -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.