To entitle any party to foreclose by advertisement, it shall be necessary that no action or proceeding shall have been instituted at law to recover the debt then remaining secured by such mortgage, or any part thereof; or, if any action or proceeding has been instituted, that the same has been discontinued, or that an execution upon the judgment rendered therein has been returned unsatisfied, in whole or in part.
SDCL 21-48-4