In any case of mandamus, certiorari, appeal to the district court, or for specific equitable relief, where the facts pleaded and proved do not entitle the petitioner to the specific remedy asked, but do show the petitioner entitled to another remedy, the court shall permit the petitioner on such terms, if any, as it may prescribe, to amend by asking for such latter remedy, which may be awarded.
Iowa. R. Civ. P. 1.458