Exact solution in an external magnetic field of Ising models with three-spin interactions