You are here: Getting Started > Tutorials > Tutorial 1: Creating a Time Off Request Form > T1-2. Creating the form solution

Tutorial 1–Step 2: Creating the form solution

In this step, you will create a Time Off Request solution that will reside on the HR Forms Form Workflow site that you created earlier. After the form and its associated workflows are completed and published, AlphaOne Bank employees can use them to request and seek approval for time off from their managers. This assumes that you have already created the necessary scripts in TRANSACTION.

On this page

Creating the solution

Back to top

  1. In Designer, click the File menu, point to New, and then click Workflow Solution for Forms.
  2. Click New Process.

    Nw process workflow

  3. Under Publishing, define the SharePoint site.
  4. Under Transaction Scripts, right-click, click Import, and then browse to the script.
  5. Select the script. Click OK.
  6. Click Tools, and then click Manage Field Mappings.
  7. Click Add. In the New Web Service dialog box, in the Script Name box, select the script that you want to add.
  8. Add a description.

    Note:XML group name is the name of the parameter group that will be created in the InfoPath form data source.

  9. For the login type, select Windows Authentication or Network credentials. Add the user name and password as necessary.
  10. To validate credentials for retrieving script fields from CENTRAL, click Test.

Mapping fields

Back to top

  1. In the Manage Field Mappings dialog box, you find all the fields that were retrieved from your script.
    • To retain the fields with mapping, click Use existing fields.
    • To create new mapping, clear Use existing fields.

    Tip: It is best practice to set the IsOverwriteAllowed property to "true." As you develop and republish, your script will be overwritten and multiple copies will not accumulate. When you want to create a new solution with the same name, set the property to "false."

  2. To delete a field, click the x.
  3. If you need to reorder your fields, click the Form Field arrow to change the order.

    Note: If field changes trigger Web services, and the Web services are dependent on the results of other Web services, ensure that the Web services are mapped in the correct order.

  4. Click Generate InfoPath form. The script fields are mapped. You can now design the look of the form.

Creating views

Back to top

Views can correspond to user roles or activities in the workflow. With views, you can control what data is seen at a given part of the workflow and by whom. You must create solution views from within the solution. If you create a view in InfoPath, it cannot be used in Workflow.

  1. Right-click Form Views, and then click New.

    FormViews

  2. In the Name box, type TimeOffRequestor.

Designing the Time Off Request form

Back to top

  1. In Designer, click the TimeOffRequestor view, and then click Launch InfoPath.
  2. Place the cursor in the blank InfoPath form and type Time Off Request.
  3. Select the text, set the font size to 14, and then click Bold.
  4. Below the Time Off Request header, type Form ID:
  5. In the Controls area, click Controls.
  6. From the Standard area, click Text Box. The new text box should appear on your form to the right of the Form ID label.
  7. Right-click the new text box, then click Text Box Properties.

  8. In the Field Name box type formId.
  9. Click OK.
  10. Using the same instructions as in steps 4-9, add the following controls to your form in the order shown:

    Control Name

    Control Type

    Field Name

    Additional Settings

    RequestorText BoxrequestorNone
    Current DateDate PickercurrentDateNone
    Start DateDate PickerstartDateNone
    Return DateDate PickerreturnDateNone
    Number of Days OffText BoxtotalDaysOffSelect Whole Number (integer) as the Data Type
    NotesText BoxnotesOn the Display tab, enable Paragraph Breaks and Wrap Text.
    On the Size tab, set the Height to 50 and the Width to 250.
  11. Place the cursor at the bottom of the form.
  12. In the Controls pane, in the Custom area, click ShareVis.ProcessControl.

    The ShareVis.ProcessControl custom control facilitates the flow of data between your form and its associated workflows, which you will create later in this guide.

    NOTE: Do not copy and paste custom controls in InfoPath.

    Your Time Off Request form should now look like this:

  13. Click the Save button or close the form and wait until you are prompted to save the form.
  14. Important: Do not click Save As. If you click Save As, the form will be separated from the solution.

  15. Close InfoPath.
  16. In Designer, on the File menu, click Save Solution.

Tip: After saving your InfoPath file, always save your work in Designer as well.