Where an execution issues on a judgment for the benefit, in whole or in part, of any person other than the plaintiff, if that fact appear by the record, the clerk shall, in the execution or an indorsement thereon, state the extent of the interest therein of such persons, and such person may, as a party injured, either in his own name or that of the plaintiff, prosecute a suit or motion against the officer.