When submitting InfoPath forms into a Forms Library it is necessary to make sure that every form receives its unique name. Otherwise it would overwrite an already existing document with the same name or simply won’t submit at all.
The safest way here would be to append the date and time to the form name. It is close to impossible that 2 forms with the same name will be submitted in the same second.
Example: Use this formula when configuring the “submit” data connection:
File name: concat(The_name_to_give, “-“, now())
This portion ensures that the form will be transferred to the Forms Library. You can change the name afterwards by starting a SharePoint Designer or Visual Studio workflow on the event “when a new item was created in the Library” and use whatever formula to give it a more meaningful name with an increasing number.