The invention relates to polymers whose water solubility may be triggered by changes in pH, salt concentration, concentration of surfactant or a combination of both. The polymer is a copolymer or terpolymer containing from 2 to 60 mole percent of an amine functionality that has been neutralized with a fixed acid. Specifically films formed from these polymers will be insoluble at a higher pH, but will become soluble at a lower pH. The polymers are also insoluble at a higher salt concentration, but become soluble at a lower salt concentration. The polymers can be used to coat or encapsulate active ingredients, that are released based on changes in the environment, such as in the rinse cycle of a dishwasher or laundry washing machine.