How to Use a Part Number as an InfoPath File Name in SharePoint
Question details
The user needs to configure an InfoPath form to automatically generate the submitted file name based on a part number inputted into the form.

- Product
- Microsoft InfoPath / SharePoint
- Device & OS
- not provided
- Scenario
- Automating the file naming convention when users submit InfoPath forms to a SharePoint document library.
- Observed behavior
- Forms currently require manual renaming, and the goal is to automatically extract the part number from a user-created text box to name the submitted document.
Verify that you have Design permissions for the InfoPath form and the appropriate Contributor rights to publish and submit data to the target SharePoint document library.
Configure Submit Data Connection in InfoPath
Set up a SharePoint Submit Data Connection that uses a formula to dynamically assign the form's file name based on the part number field.
By configuring a specific submit connection in InfoPath, you can use the FX (formula) builder to dynamically reference fields within your form. This ensures every submission is automatically named according to user input.
Open your form in InfoPath Designer and insert a Text Box control to capture the part number from the user.
Navigate to the Data ribbon, click on 'Data Connections', select 'Add', and choose 'Create a new connection to submit data'. Then select 'To a document library on a SharePoint site'.
Type the exact URL of the destination SharePoint document library where the submitted forms should be saved.
In the File name field of the wizard, click the FX button. Click 'Insert Field or Group' and select your part number text box node from the data source.
Finish the data connection wizard, republish your form to SharePoint, and submit a test entry to confirm the file is saved using the part number as its name.

Looking for a Lightweight Document Solution? Try WPS Office
While Microsoft InfoPath handles complex SharePoint forms, everyday document, spreadsheet, and presentation tasks shouldn't be overly complicated. WPS Office provides a free, fast, and highly compatible alternative to Microsoft Office, featuring a familiar interface that makes migration seamless.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for Windows, Mac, or Linux.
- 2. Install and Launch: Run the setup file and launch WPS Office to instantly access Writer, Spreadsheets, and Presentation modules from one unified dashboard.
- 3. Open Your Office Files: Drag and drop your existing Microsoft Office documents into the application to edit them seamlessly with full format preservation.

Frequently Asked Questions
Why is the FX button not showing my newly created part number field in InfoPath?
If you don't see your field, it might not be properly bound to the main data source or it might be located inside a repeating group. Ensure you expand the correct 'myFields' folder in the data source tree when using the 'Insert Field or Group' dialog.
Can I combine the part number with a user's name for the file name?
Yes. In the FX formula builder, you can use the concat() function. For example, you can write concat(PartNumber, "-", UserName) to combine the part number field, a hyphen, and a username field into a single file name.
What happens if a user submits a form with a part number that already exists in SharePoint?
During the Submit Data Connection setup, there is an option titled 'Allow overwrite if file exists'. If this is checked, the old file will be overwritten. If unchecked, InfoPath will display an error to the user stating the file cannot be submitted because the name already exists.




