If the judgment is rendered in the action for the defendant, or, if the action is dismissed by the court, by the plaintiff, or, by agreement of the parties, or, if judgment has been entered for the plaintiff and has been satisfied of record, the attachment shall, subject to the right of appeal, automatically be discharged and the property attached, or its proceeds, shall be returned to the defendant. If the attachment has been entered on the encumbrance book, it shall be the duty of the clerk to cancel such attachment, and in the entry of cancellation, the clerk shall refer to the entry in the case showing the clerk's authority to cancel said attachment.
Iowa Code § 639.64