Jump to content

"or" statement with different conditions


Recommended Posts

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 "";
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 "";
return Rule("Aufofill Rule");


Am I on the right track? Thanks for any input on how to make this work.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...