Searching text field in calculation
Hello! I am using Filemaker Pro 12 on my Mac and have a question about a calculation field. What I'm trying to do is have the grand total field perform an equation (offer a discount) if the address 1 field contains the words "Maxwells Green". I have two tables, Customers::__pkCustomersID (parent table) and Events::_fkCustomersID (child table) linked with those fields in a 1 to many relationship. The customers field I want searched is Customers::Address1. The field I have created to perform the calculation is Events::GrandTotal. We are offering a discount to people who live at Maxwells Green, and because I want to make the discount automatic, I was hoping that once the addresses is typed in (ex 7 Maxwells Green) into the Address1 field, that the discount would automatically apply (20% off). I do not know what to use in the calculation to search the Address1 field to look for Maxwells Green. Something like "If address1 contains 'Maxwells Green', perform equation with discount, otherwise perform equation without discount". Is this even possible in a calculation field or should I think about creating a script to search the address1 for Maxwells Green and populate a 'hidden' field with a 1 and then reference that field in the calculation? Trying to think this through and curious to see if it's possible to do this in a calculation field. Thanks!