I have a field that contains a list of comma separated state abbreviations and alternates (e.g. AZ, CO, DC, LA, MD, MI, NV, NV-WH, NY, NY-ON, RI, TN, WA, WA-MS, WA-SK). Not every record has the same set of abbreviations and they are not in any semblance of order. I want to be able to filter on certain states without flagging the alternates. E.G., I was trying to use a filter with Contains([State],"NY") but I want to make sure that I'm not getting records that contain only NY-ON without NY.
The desired result would include this logic:
State contains "NY" but not "NY-ON" = True
State contains "NY" and "NY-ON" = True
State contains "NY-ON" but not "NY" = False
I tried adding a comma and using Contains([State],"NY,") but that would rule out any record where NY was the only entry or at the end of the list.
I'd appreciate any guidance.