The judgment shall determine which party is entitled to the possession of the property, and shall designate the party's right therein, and if such party have not the possession thereof, shall also determine the value of the right of such party, which right shall be absolute as to an adverse party, and shall also award such damages to either party as the party may be entitled to for the illegal detention thereof. If the judgment be against the plaintiff for the money value of the property, it shall also be against the sureties on the plaintiff's bond.
Iowa Code § 643.17