开发者

Add fields to Sharepoint Workflow Task

I'm currently making a pretty simple approval workflow in sharepoint using sharepoint designer. One of the design goals that we have for this workflow is that we want to minimize the amount of custom coding that we have to do so I'd appreciate answers that involve using sharepoint designer instead of whipping out VS.

So the workflow should start when a person adds an item to a list. When the workflow kicks off it would create a task and and assign a due date of +2 business days and assign the responsibility to a group of users When a user completes the task then it would record the individual person who completed the task as well as the date it was 开发者_如何学运维completed.

It's pretty easy to add fields to the list but the purist in me kind of balks at this since these fields would be null and it violates first normal form. Ie a list that went to Task1 but not Task2 would have four fields Task1ApprovedBy, Task1FinishedDate, Task2ApprovedBy, Task2FinishedDate and both the Task2 fields would be null.

--edit--

Sorry If I'm not being clear about the question. I'm using Sharepoint Designer and I would like to update a list item in a lookup when a user completes a task item. How do I select the last task for a particular item that was completed and update that last task two values "Completed By" and Completed Date values? I'd prefer to do this on the Task list since that would also make reporting easier. I'd just create a view on the Task list instead of doing some type of join between the two list to when a particular task was completed.

Thank you for the help!

Jason


It sounds like you need two workflows here. One on the "Main" list and one on the "Tasks" list:

  1. The first workflow is tied to the "Main" list. It fires when a user creates a new list item in the "Main" list. This workflow simply creates a new item in the "Tasks" list (with the correct people assigned, description, dates, etc...)

  2. The second workflow is tied to the "Tasks" list. It fires whenever an item in the Tasks list is changed. The workflow checks to see if the status field is "Complete". If it is, then assign the "Completed By" field to the current person editing the task and assign the "Completed Date" value to today.

(Note that, in a SharePoint Designer workflow, there is no way to evaluate the properties of the list item prior to the update. If a completed task is updated, the SPD workflow will be unable to determine that the task was already completed. Basically, each update to a completed task will update the Completed By/Date fields. If you want a more complex workflow - which only updates when the status is changed to "Complete" - you will need to use Visual Studio).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜