I'm trying to create formula field which returns 1 when text field CONTAINS certain text, else 0. E.g. if text field "City" CONTAINS NY or New York or NewYork, then it should return 1 else 0.
I'm able to achieve this using EQUALS as follows. But I want to use CONTAINS. Can someone please help, how to use CONTAINS or any other solution that searches particular text within a text field and returns NUMBER?
if (City= "NY" || City = "New York" || City = "NewYork", 1, 0)
I tried this as well but it gives error "Incorrect number of parameters for function 'if()'. Expected 3, received 5".
if (CONTAINS(City,"NY"),CONTAINS(City,"New York"),CONTAINS(City,"NewYork"),1,0)