You are here: Reference Guides > Designer Form Controls (A-Z) > Ws.FormName

Ws.FormName

With the Ws.FormName Control you can change a form name from its default setting (Form Name – Todays Date/Time) to something more customizable. The Ws.FormName control can look up a Form Name Template that has been developed in Winshuttle Designer, or it can render a text box in which a user can input a value and that value will be returned as the new Form Name when it is submitted to the Forms Site.

Download example (.wssln file)

Ws.Formname Properties

Property

Description

Field Description XPath

The field name that should receive the description of the form.

Field Name XPath

The field name that should receive the generated name.

Field URL XPath

The field name that should receive the URL to the form.

Force Title Update

If selected, executes the control to assign a form name even if a name already exists.

Form Definition Version XPath

The field name that should receive the form version that is running.

Process Definition Name XPath

The field name that should receive the process definition name that is running.

Process Definition Version XPath

The field name that should receive the process definition version that is running.

Run at End

Assigns the form name after the form is submitted.

Run at Start

Assigns the form name when the form is started.

Template Name & Fields

Comma-separated list of name template names and field names to combine into the name for the form.

Example: FormNameTemplate,//my:field1,//my:field2

In order to use an auto-generated Form Name, you must first create a Form Name Template in Winshuttle Designer.

Creating and adding a Form Name Template

Back to top

  1. On the Designer menu bar, click Tools, and then click Name Template.
  2. In the Name Template dialog box, enter the link to your FormEx site.
  3. Click Add to add a Form Template.

  4. Enter a name for your Name Template

  5. Select the Name Template you just created and click Modify. You will be presented with the Edit Name Template dialog box with one standard entry:

    ***You will need one entry for anything you want to generate. In this example, I will be using 2 entries. The first entry will be generating a Letter of the alphabet starting with the letter A. The second entry will be a 6 digit number starting with 000001. My first Form submitted should have the naming convention of A000001.

  6. Click the Add button. A new entry is added:

    To make the letter first, we’ll modify the first entry of the name template.

  7. Select the First Entry and then click Modify.
  8. Change the Type from Number to Alphabetic.
  9. Enter the letter A for the Value.

  10. Click OK twice, and then click Close.

Configuring the Ws.FormName Control to use the newly created Name Template

Back to top

  1. Add the Ws.FormName Control to your form.
  2. Right click on the control and go into its properties.

  3. In the Template Name & Fields property, enter the name of the template you just created

    **It is a good idea to use the Run At End option so the form name isn’t generated until the very end. This will prevent the form from taking up numbers and creating gaps in your generated form name.

  4. Click OK and publish your form and workflow.

Additional Information/Options

Back to top

If you want more information to be populated in your form, you have the following information available:

  • Form Name
  • Form Description
  • URL to Form
  • Process Definition Name
  • Process Definition Version
  • Form Definition Version

Refer to the above table at the beginning of the document for further explanation on what each of these attributes provide.

To use any of these attributes, you will need to create a text box within your form and provide the field name: