Wednesday, November 3, 2010

Create Update List Item to value of people/user field

Create Update List Item to value of people/user field

1. Install Windows SharePoint Services February Cumulative Update:

If you are unable to install the SharePoint February CU, then here is a workaround:
1. Create a string variable in the workflow, and call it UserID.
2. Add the workflow action "Set Workflow Variable". Set the UserID variable to whatever user type column you are interested in (example: "Created By").
3. Add the workflow action "Build Dynamic String". In the dynamic string dialog, type "-1;#" (without quotes). Then, click "Add Lookup" to the workflow variable UserID. Click OK.
4. Still on the build a dynamic string action, set the variable to store in as UserID.
5. Change the workflow action to use the variable UserID when updating or setting the Person or Group type field.
NOTE: the same workaround works for FBA (forms based authentication) providers, as well.

Reference :

In SharePoint Designer, use a Dynamic String on your Person or Group field to insert "-1;#" to the beginnning of the field. I'm guessing this is due to some sort of error that occurs when SP parses a Person/Group list

Search Text:Create New Item Workflow Fails If people/user field error updating list item.

No comments:

Post a Comment