An affidavit may be used: 1. To verify a pleading. 2. To prove the service of a summons, notice, or other process in an action. 3. To obtain a provisional remedy. 4. To obtain an examination of a witness. 5. To obtain a stay of proceedings. 6. Upon a motion. 7. In any other case permitted by law.