Using InfoPath Data in SharePoint Lists

October 10, 2008 14:37 by randy

When submitting an InfoPath for to a SharePoint list, the data from the IP form can be used to to populate values in the document list or other lists on the SharePoint site.

Here are the steps.

InfoPath

After the IP form is complete, the fields that are to be exposed to SharePoint need to be promoted as properties. 

1. Select the Form Options selection from the Tools menu
2. Select the Property Promotion option on the left side of the Form Options Dialog

clip_image002

3. Click the Add button to add a field to the list

clip_image004

a. The Select a Field or Group dialog box will show all of the fields used in the IP form.
b. Select the field you want to make available to SharePoint
c. Update the Column Name to the name you want to show in SharePoint

HEY! This name does NOT need to be the same as the field name you selected from the list. IP/SharePoint keep a reference to the field, not the pushing name.

HEY! When you select the field from the list, IP will attempt to create a user friendly name for the field. The result of this is the addition of spaces added to the name. Sometimes this makes sense, not often. So make sure you check the name before you click OK.

 

d. Click OK
e. Repeat this for all of the fields you want to be available in SharePoint

clip_image006

4. Publish the form to SharePoint

SharePoint

In the list used to store the data from the IP document (this can be the same list used to store the IP document or a different list altogether), create new column(s) to store the data.

1. Select the List Settings option from the Setting menu option
clip_image008

2. Under the Columns group, select Create Column
3. Enter the data for the new column: Name, Type, Description, etc…
4. Click OK
5. Repeat steps 2-4 as necessary to add all of the columns needed

SharePoint Designer

After the IP form has been completed and submitted to SharePoint and the workflow is started, the fields that where promoted will be available to the work flow.

This example is based on a custom work flow in SharePoint Designer


To reference the fields from the Conditions logic section:

1. Utilize the first condition block or add a new one
2. Select the “Compare <Your List Name Here > field” option

clip_image010

3. Select the Field label on the new condition description

clip_image012

4. The promoted fields, along with all other list fields, will show in the list
5. Select the field you want to test
6. Select the Value label
7. Enter or select the appropriate value for the conditional test

clip_image014


To use the promoted fields to populate the current list:

1. Create a new Action
2. Select the Update List Item option

clip_image016

HEY! The order of items in this list is dynamic. Items will not always show in this order. The order of the items is based on the last one used.

3. Leave the List selection as Current Item
4. In the Update List Item dialog box click the Add button
    a. From the Set this field dropdown, select the field (column) to update
    b. Select the clip_image018 (function) button next to the To this value box
          i. Leave the Source field as Current Item
          ii. From the field dropdown, select the promoted field to use
          iii. Click OK
     c. Click OK

     clip_image020

     d. Repeat for each column that is to be updated with the IP form data

5. Click OK


To use the promoted fields to create a new list item in a different list:

1. Add a new Action
2. Select the Create List Item option

clip_image022

3. Select the this list option
4. From the List dropdown, select the list to use

HEY! After the list is selected, the Field/Value list will show all of the required fields (columns) for the list

5. In the Create New List Item dialog box click the Add button
     a. From the Set this field dropdown, select the field (column) to update
     b. Select the clip_image018[1] (function) button to the right of the To this value box
          i. Leave the Source field as Current Item
          ii. From the field dropdown, select the promoted field to use
          iii. Click OK
     c. Click OK
     d. Repeat for each column you want to update with the IP form data
6. Click OK

To use the promoted fields to update an existing list item in a different list

1. Create a new Action
2. Select the Update List Item option

clip_image024

3. Select the this list option
4. From the List dropdown, select the list to use
5. In the Create New List Item dialog box click the Add button
     a. From the Set this field dropdown, select the field (column) to update
     b. Select the clip_image018[2] (function) button to the right of the “To this value” box
          i. Leave the “Source” field as Current Item
          ii. From the field dropdown, select the promoted field you want to use
          iii. Click OK
     c. Click OK
     d. Repeat for each column you want to update with the IP form data
6. Select the appropriate list item to update
     a. From the Fields dropdown (at the bottom of the dialog), select the field to use as a unique reference for the item to be updated
     b. Enter the value to be used as the key to identify the list item to be updated. (if the data is stored as a work flow variable or a promoted field, use theclip_image018[3] (function) button to reference that data)

     clip_image026

7. Click OK

Thanks for listening.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Develop a custom OR approval workflow in SharePoint Designer

October 2, 2008 09:04 by oodnar

I have moved the contents of this post to the Tutorials page.  Things just got a little too crowded!

 SharePoint Designer provides a good interface for workflow development.  One, of the few, drawback is that; it is not always intuitive.  One case of this is creating a custom approval workflow.

I have blogged before about creating a custom approval workflow with multiple approvers.  This example shows how to create the approval workflow with multiple approvers.  Each approver is required to review and act.

This example shows how to create an approval workflow that allows for multiple approvers, but only one is required to act.

Develop a Custom OR Approval Workflow with SharePoint Designer

Thanks for listening!

 


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Custom Approval Workflow

September 12, 2008 16:15 by randy

What

One of the first tasks I needed to take care of for my current client was to create a multi-level workflow.  The client’s main requirement was that the workflow be designed in SharePoint Designer.  The second requirement was the data collection was to be done with an InfoPath form.

How

This was implemented by utilizing C# behind the IP form, published properties from the IP form, workflow variables in SharePoint Designer and custom tasks in SPD.

Flow (The other requirements)

The process to be controlled by the workflow is used to grant access to internal systems.  Access to these systems is granted by the company division that controls the systems.  In this case, there were three divisions.  The request is to be routed from division to division sequentially.Additionally, the request is rejected or approved as a whole.  If any division rejects the request the entire request is rejected.The initiating user was also to be kept in the loop as to the status of the request.  Email notification from the workflow was used to meet this requirement.

The Details

I have created a tutorial that outlines the steps that were taken to implement this solution:
http://cycogeek.fiesta25.com/blogs/cycogeek/page/Create-Custom-Approval-Workflow-with-SharePoint-Designer.aspx


Take a look.  Any and all feedback will be appreciated.

Thanks for listening.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Change Task List Associated with a Custom Workflow

September 4, 2008 16:51 by randy

When you create a custom work flow in SharePoint Designer, the work flow attaches the work flow tasks to the first list it finds.  This is usually the first list shown in the "List Gallery".

There are two ways to deal with this.

The first is to create a new list and name it in a way that will put it first in the list.  IE: AAA My Task List. Then create your new work flow.  This is not alway sconvenient as the work flow may already be created.

The second way it to edit the xxx.xoml.wfxconfig.xml and change the GUID related to the task list.  

1 <Association  
2         ListID="{F718E2A9-5EF0-4283-86DC-09368C070460}" 
3         TaskListID="{1C52F4AD-F0FA-4856-824B-B391B76260DB}" 
4         StartOnCreate="true" 
5 > 
6  


NOTE: This will need to be done in each of the supporting .aspx files as well.  The easiest way to do this is the good ole ctrl+h (Find and Replace).

To get the GUID for the new list:
1. Open the list you want to associate the work flow to in SharePoint
2. Goto Settings --> List Settings
3. Right click on "Audience targeting settings"
4. Select "Copy Shortcut"
5. Open Notepad (or other text editor)
6. Paste

It will look similar to this:
http://spsp/_layouts/ListEnableTargeting.aspx?List={f01fc4bf-6185-4d7f-a4bf-276b0beacf07}  

This is the GUID for the list.

Thanks for listening.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5