- Winshuttle Foundation
On this page
Name templates allow you to create unique alpha, numeric or date values for your form names.
Note that you cannot use invalid file name characters (@!*,.?^&% ) in the name for the Name Template.
The default name for forms is the form type combined with the date and time the form was created; however, you can create a more user-friendly name for your forms using the Form Name Element and a Name Template.
The Form Name Element enables you to incorporate name templates and/or field values to create the name for your form(s).
Name templates defined in a solution can only be used within the solution in which they are created. A Global Name Template (see below) is just a name template that is stored on a SharePoint site and can be used across multiple solutions connecting to that SharePoint site. A standard name template is stored within a single solution and used only by that solution.
The following sections describe how to create a name template and then link the template to your form.
Name templates must be used in conjunction with the Form Name Element.
Adding or editing global name templates
- Click the Solution tab.
- Click Edit Global Name Templates.
- In the Name Templates dialog box, do the following:
- SharePoint Site: Type the address to the SharePoint site, or select the SharePoint site from the drop down.
- Click Create to create a new name template, and then follow the instructions (beginning at step 3) for Adding a new name template.
Adding a new name template
Alternate method for adding a name template: You can also right-click Name Templates in the Solution pane, and then click Add Name Template.
The new template appears in the Solution Tree pane, under Name Templates.
Adding or editing name template values
- Click (the Edit icon) to edit the existing name template value, or click Add to add a new one.
- Next to Type, click the drop arrow and select one of the following from menu.
- Constant: Select this option to include a constant value in your name template that will not change and will be included in all generated names. For example, an HR department could include the constant TOR to create a name template to auto-generate names for Time Off Request forms.
- Alphabetic: Select this option to include a running alphabetic identifier in your name template. For example, you could have a sequence of unique alphabetic identifiers such as AAA, AAB, ..., AAZ, ABA, etc.
- Number: Select this option to include a running numeric value, starting with the value you enter in the Value text box in step 10. For example, if you select Number as the Type and enter 000 in the Value text box, the next name generated will be 001.
- Year: Select this option to include the year in your name template. For example, all forms will have a unique name starting with 10.
- Month: Select this option to include a two-digit indicator of the month in your name template. For example, all forms generated in May will have a unique name starting with 05.
- Day: Select this option to include a two-digit indicator of the day of the month in your name template. For example, all forms generated on January 14 will have a unique name starting with 14.
- Quarter: Select this option to include a two-digit indicator of the quarter in your name template. For example, all forms generated in the third quarter will have a unique name starting with 03.
- In the Value text box, type the value that you want your name scheme to begin with.
- Click OK.
Re-ordering name template components
To re-order Name Template components, drag-and-drop them into the new location.
Dragging and dropping name template components.
Setting the default name template
- In the Solution Tree Window, right-click the name template.
- Click Set Default.
How to configure the Form Name element with a name template
To use the name template for generating a name for your form:
- Add a Form Name Element to your form.
- In the header area of the form, click the Form Name element you just inserted.
- In the Properties pane, under General Settings and next to Template, click the Options button [...]
- In the Form Name Builder, click Add.
- In the Form Name element dialog box, do the following:
- Type: Select one of the following from the drop down: Solution Name Template, Global Name Template, or Form Field.
- Value: Select a value from the drop down. This drop down will be populated automatically according to what is selected under Type. For example, if you select Form Field under Type, the Value drop down will display a list of all the fields in your form.
- Click OK to complete the Form Name Builder, or click Add if you wish to add more name templates.
How to add form data to your form name
In addition to using name templates you may also want to include form data in the name of your form. This can help users with a large number of tasks to easily identify items requiring attention.
Using a combination of static and variable name templates with form data enables you to create form names to match your particular process.
- Highlight the form name control of your form.
In the Properties Pane, next to Template, click the options button [...] to edit your Template.
- Click Add.
- In the Form Name Element box:
- Under Type, select Form Field.
- Under Value, select your form field.
- Repeat steps 2-3 until you have added all of your form fields, and then click OK.
- Save and deploy your solution.
- Open, complete, and then save and route your form.
- You should now see your custom form name in the Winshuttle Form Library.