Methods are presented to induce a screenout during a subterranean formation fracturing or combined fracturing and gravel packing treatment having a viscoelastic surfactant-based carrier fluid by laying down a filter cake at least a portion of which is a base-soluble material, injecting proppant slurry, and causing hydrolysis and dissolution of the solid base-soluble material by adding base so that leak-off increases, the concentration of proppant in the fracture increases, and the proppant screens out. A method of gravel packing with a viscoelastic surfactant-based carrier fluid by laying down a filter cake at least a portion of which is a base-soluble material, injecting gravel, and causing hydrolysis and dissolution of the solid base-soluble material by adding base. Methods of slowing or accelerating the hydrolysis and dissolution are given, and addition of bridging-promoting materials is included.