• Amanda Howell 15
  • NEWBIE
  • 10 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to check our state and country fields to make sure they are being entered correctly from an integration and get a notification if a state or country is incorrect. However, the Contains function does not seem to want to work with the : to separate multiples. I am getting strange results. For example with the following short version if I put anything, including the specified names, into the field I get a result of "unknown".
IF(CONTAINS(UPPER(MailingCountry), "AUSTRALIA:BRITAIN:CANADA"), "Known", "Unknown")

but if I switch the MailingCountry to the end of the formula then it kinda works except even partial pieces of the names get set as "known" such as US and AIN. And that's not helpful.
IF(CONTAINS( "AUSTRALIA:BRITAIN:CANADA", UPPER(MailingCountry)), "Known","Unknown")

I've tried moving things around and just can't figure out why it doesn't work at all one way and then is too lenient the other way and matching things that aren't supposed to be matched. I don't want to use nested if then statements for each state/country because not only would that be tedious it would also go over the allowed formula length. Any insight would be greatly appreciated.
I am trying to check our state and country fields to make sure they are being entered correctly from an integration and get a notification if a state or country is incorrect. However, the Contains function does not seem to want to work with the : to separate multiples. I am getting strange results. For example with the following short version if I put anything, including the specified names, into the field I get a result of "unknown".
IF(CONTAINS(UPPER(MailingCountry), "AUSTRALIA:BRITAIN:CANADA"), "Known", "Unknown")

but if I switch the MailingCountry to the end of the formula then it kinda works except even partial pieces of the names get set as "known" such as US and AIN. And that's not helpful.
IF(CONTAINS( "AUSTRALIA:BRITAIN:CANADA", UPPER(MailingCountry)), "Known","Unknown")

I've tried moving things around and just can't figure out why it doesn't work at all one way and then is too lenient the other way and matching things that aren't supposed to be matched. I don't want to use nested if then statements for each state/country because not only would that be tedious it would also go over the allowed formula length. Any insight would be greatly appreciated.