In Iowa, a builder-owner or general contractor must post notice of commencement of work within 10 days of beginning work in order to properly file and enforce a mechanic's lien. The notice is only effective as to work and material provided after it is posted. If you are a subcontractor and the owner or general contractor failed to post such notice, you can cure the defect by posting it in conjunction with the preliminary notice that is required to be posted of all subcontractors.
If you have successfully navigated the preliminary requirements and are able to file a mechanic's lien, the person against whom you filed the lien can provide written demand for you to bring suit to foreclose the lien within 30 days. If you do not bring suit to foreclose the lien within 30 days, then the lien is forfeited.
If written demand to foreclose the lien is not provided, you do not have unlimited time to enforce it. You have two years plus ninety days from the last date on which labor or material was provided to foreclose the lien. Additionally, you will need to "perfect" the lien before you can foreclose.
If collateral is provided as security before work is complete, you cannot file a mechanic's lien. If security is provided after work is complete, you can still file a mechanic's lien. As you can see, there are nuances in the law of mechanic's liens, and these examples are illustrative, not exhaustive. If you do not do it right, you may end up forfeiting your right to file and foreclose the lien.