Help Center>Foundation Help

Applies to:

  • Winshuttle Foundation

5-2. Add workflow participant lookup

For this step in development we will configure the form to look up 2 additional workflow participants from a SharePoint list: a Purchasing Manager and an Accounting Manager. First, a custom SharePoint list that will contain the Purchasing Organization and the Purchasing Manager will be created.

On this page

  1. Create data connections
  2. Add workflow participant elements
  3. Add participant fields to the form
  4. Configure the workflow participants
  5. Create a rule to automate selection

Note that this is dependent upon the creation of SharePoint lists, which is beyond the scope of this tutorial. See Microsoft's tutorial SharePoint Lists IV: Create Custom SharePoint Lists for more in-depth information about this process.

The SharePoint list will have the following properties:

  • Information type=Person or Group
  • Require column to contain information: No
  • Enforce Unique Values: No
  • Allow Selection of: People Only
  • Choose From: All Users
  • Show Field: ID
  • Add to default view: yes (checked)

This will enable the form to look up the appropriate Purchasing Manager based upon the Purchasing Organization. For example, if the Purchasing Organization is in Denmark, then the Purchasing Manager in Denmark will be assigned as a workflow participant.

The end result will look something like this:

And the same procedure is also used to create an Accounting Routing List, which is shown below for illustrative purposes.

With the lists in place, adding a SharePoint lookup is much the same as in the previous step.

Create data connections

Back to top

With the SharePoint lists for Purchasing and Accounting created, the next step is to connect the necessary form fields to the SharePoint lists through data connections, just as we did in Phase 4, step 4-3: Connect form drop-down lists to SharePoint lists.) Then we will add a rule that essentially tells the form that when the Company Code field is changed, get the accounting manager from the Company code list.

For additional information on data connections, see Adding data connections for instructions on how to run the appropriate Wizard in Composer to set them up.

  1. In Composer, click the Solution tab.
  2. In the Solution Properties pane, right-click Data Connection, and then click Add Data Connection.
  3. On the Data Connection screen:
    • Name: Type a name for the connection. For this example we are using PurchasingAccountingRouting.
    • Type: Click the arrow, and then select SharePoint Library or List from the menu.
    • SharePoint Site URL: The http:// address to the SharePoint Library or List.
    • Fields: Check the fields you wish to use (leave the default fields for this example).

    See the example below

  4. Click OK to complete the connection.

Add workflow participant elements

Back to top

  1. In Composer, click the Form tab.
  2. On the View tab, click the Originator view.
  3. In the Properties pane, click Elements.
  4. In the Properties pane, click Advanced Elements, and then click Workflow Participant.
  5. Click Workflow Participant again to add a second workflow participant element.

 

Add participant fields to the form

Back to top

Now we will add text box elements to the Process Information part of the form.

  1. In the Form Canvas, click the Originator view.
  2. At the bottom of the form, click the Process Information group.
  3. In the Properties Pane, click Elements.
  4. Click Basic Elements, and then click Text Box.

  5. Click Text Box again to add a second text box.
  6. In the Form Canvas, in the Process Information section:
    • Click on Label (click to edit) (for the first newly added text box), and then rename the text box to AccountingPerson.
    • Click on Label (click to edit), (for the second newly added text box), and then rename the text box to PurchasingPerson.
  7. Right-click the AccountingPerson text box, and then click Move Up.
  8. Right-click the PurchasingPerson text box, and then click Move Up.

The end result should look something like this:

Configure the workflow participants

Back to top

  1. In the Composer Form Canvas, beneath the view tabs, click the Workflow Participant control you want to configure.

  2. In the Properties pane, configure the following (leave other fields blank or at default values):
    • Swim Lane: Click the arrow, and then select a Swim Lane (Accounting for this tutorial) from the menu.
    • Full Name Field: Click the arrow, and then select AccountingPerson from the menu.
  3. Repeat the steps above for the second Workflow Participant element, using the following settings:
    • Swim Lane: Click the arrow, and then select a Swim Lane (Purchasing for this tutorial) from the menu.
    • Full Name Field: Click the arrow, and then select PurchasingPerson from the menu.

 

Create a rule to automate selection

Back to top

For the final part of this step, we will create a rule that automatically sets the value of the Accounting Person field based upon information in the Accounting Manager field.

  1. In the Form Canvas, below Process Information, click the AccountingPerson element.
  2. In the Properties pane, next to Rules, click [...] (the options button).

  3. In the Rules Editor screen, click Add, and then click Rule Wizard.
  4. On the Create Rule screen, set the following values (leave all others at default):
    • Label: Type the label for the rule. For example, SetAccountingPerson.
    • Check the box next to Run Rule On Form Load.
    • Type: Click the arrow, and then select Actions from the menu.
  5. Below Type, click Add.
  6. On the Add Rule Action screen:
    • Action: Click the arrow, and then select Set a Field Value from the menu. (Note: This should be the default setting.)
    • Field: Click the arrow, and then select AccountingPerson from the menu.
    • Value: Click the [F/x] (Formula)button.

  7. On the Insert Formula screen, click Insert External Data.
  8. On the Insert External Data screen:
    • Data Connection: Click the arrow, and then select the data connection created at the beginning of this step (PurchasingAccountingRouting for this example) from the menu.
    • Field: Click the arrow, and then select AccountingManager from the menu.

    AccountingManager is the field from the SharePoint List created at the beginning of this step.

    • Filter: Click Edit Filter.
  9. On the Filter Conditions screen, create a filter for "CompanyCode is Equal to Company_Code", and then click OK.

  10. Click OK.

  11. On the Add Rule Action screen, click OK.
  12. On the Create Rule screen, click OK.