When using the 'Collect Data from a User' action in a workflow, how does the workflow know which task list to assign the task to? Is there a way to specify which task list the task is created in?
Stump the Panel » SharePoint Workflow for All Users
Collect Data from a User
(4 posts)-
Posted 3 days ago #
-
'Collect Data from a User' puts the Task into the "first" task list, according to Microsoft.
From trial and error, I have learned that it's the "first," alphabetically. Just like everything else in SharePoint, however, the Workflow works with a GUID so you can change the name of your list once you have everything flowing the way it's supposed to.
The time when your list has to be first, alphabetically, is when your Workflow "compiles" for the first time and SharePoint creates your task content type. At that point the Content Type is connected by GUID to that task list.
So, putting together some of the best practices:
- Create a Tasks list with your desired final non-spaced URL-safe title. This will be used on creation to give your new list an easily identifiable "variable" name, which will also be used for the URL for the list.
- Change the title of your new Tasks list to be "first" alphabetically. This will be temporary, so it doesn't matter what it's called, as long as it's first, alphabetically, among all Tasks lists for the site.
- Create your Workflow in SharePoint Designer, using non-spaced, URL-friendly titles for your collection forms. This is what goes in the Name on the second page of the Custom Task Wizard for this Action. Again, this title will be used to create the .aspx page and, therefore, in a URL, so eliminate the %20 from your URL by removing spaces on this title.
- Click Finish to create your Workflow. SharePoint Designer does several things for you at this point:
- creates a new content type,
- adds it to the "first" Tasks list,
- creates a data collection form (in the Workflow directory), and
- associates the EditForm.aspx for that content type to redirect to this data collection form.
- Rename your new Tasks list. Again, since the content type created by the Workflow is tied to your new list's GUID, changing the name won't mess anything up.
- Rename your new content type. From your new Tasks list, click on Settings -> List Settings. Here you can click on the name of your new content type (if the Content Types section isn't visible, click on Advanced Settings and set "Allow management of content types?" to Yes) and change its Name and description.
(ex: RecruitingTasks - makes your URL http://YourSite/Lists/RecruitingTasks/)
(ex: Aardvark)
(ex: ManagerRecommendation)
(ex: …YourSite/Lists/RecruitingTasks/EditForm.aspx?ID=1 redirects to …YourSite/Workflows/YourWorkflowName/ManagerRecommendation.aspx?ID=1)
(ex: Recruiting Tasks)
WARNING: Anything that changes the name of the content type from the Workflow will break all of this and you will need to start over. As long as you leave the name the same, however, even if the collection forms are recreated, your content types should be safe in your new Tasks list.
(ex: Manager Recommendation)
The Description field is displayed with the name under the New button. Since you are creating this type of task programatically, you might want to include "DO NOT CREATE A TASK FROM HERE" in the description, then explain to the user where to go to start the process that will create a task here.
Posted 3 days ago # -
jbhoward, you should write that up with some screen shots and submit it to Mark Miller for publication :)
Posted 3 days ago # -
Thanks so much for the detailed answer. This was extremely helpful!
Posted 2 days ago #
Reply
You must log in to post.