Tutorial 1–Step 10: Assigning Unique Names to Forms
Tutorial 1: Creating a Time Off Request Form
- Creating a form workflow site
- Creating the form solution
- Creating development profiles
- Creating the workflow
- Submitting solutions for approval
- Publishing the Solution
- Starting a new form and process
- Completing the task assignment
- Viewing task history
- Assigning unique form names
- Adding requester name and date
- Adding email notifications
- Configuring autopost
Name Templates allow you to create a naming scheme for your forms, and to automatically generate a unique name each time a form is started. You can create as many Name Templates as needed for your environment. For this example, you will create a Name Template for AlphaOne Bank to ensure automatic and consistent naming of their Time Off Request forms.
Implementing automatic form naming requires two steps:
- Creating a Name Template
- Adding the ShareVis.FormName custom control to your form to link the Name Template to the form
Configuring automatic form naming
- Sign in as Steve Designer.
- In Winshuttle Designer, from the Tools menu, click Name Template.
Note: If you have closed Winshuttle Designer since completing the previous steps in this guide, you must type the URL for your HR Forms Form Workflow site in the Site text box.
- Click the Add button.
The New Name Template dialog box appears.
- In the Name box, type Time Off Request.
- Click OK. The new template is now added to the Name Template dialog box.
- With the Time Off Request template highlighted in the Templates list, click Modify.
- In the Edit Name Template dialog box, click Add to add a new line for the default six-digit component.
- Select the first entry in the list, and then click Modify.
- In the Modify Name Component dialog box, next to Type , click the drop arrow, and then select Constant.
- In the Value box, type TOR-.
- Click OK.
- Click OK.
- Click Save and then click Done.
- Start Designer, and then open the solution Time Off Request solution file.
- Click the bottom of the form.
- On the right-hand side, click Controls .
- Scroll to the Custom Controls area, and then click ShareVis.FormName. to add the control to the form.
- Double-click the ShareVis.FormName icon on your form.
- In the ShareVis.FormName Properties dialog box, click the Form Name tab.
- In the Template Name & Fields box, type Time Off Request.
This is the name of the Name Template you created earlier.
- In the Field Name XPath box, type formId. This copies the new name generated by the name template into the Form ID box each time a new form is started.
- Click OK.
- Save your changes in InfoPath.
- Close InfoPath.
- In Designer, click Save Solution.
- On the File menu, click Publish Solution.
- Go to the HR Forms Form Workflow site.
- Click the New Form button to start a new Time Off Request form.
The new form appears and the Form ID box shows TOR-000001. Each time a new Time Off Request form is started, the Form ID box will be incremented by one.