Use the "Collect Data from User" action to create and assign a task to a user that prompts them for data. Among other things, I’ve used it to prompt a user to approve or reject a request and enter some comments.
This action takes the form of:
Collect data from this user (Output to Variable: collect1)
Clicking on data pulls up a series of dialog boxes where you specify what data the user should provide when completing the task and this user is obvious.
The output part (Variable: collect1) saves the ID of the task. You use this in your workflow to extract the user’s actual response via the "Compare any data source" condition.
That condition shows as
If field equals value
Click on field and then the f(x) icon and it pulls up another dialog box. Use this generalized dialog box to to tell SPD two things;
1. What is the list and column whose value you want to compare.
2. How should the workflow engine locate the specific row in that list?
To do this:
- Change the "Source" dropdown to point at the correct task list. Note that the dialog box expands to show a "Find the List Item" section.
- In the Lookup Details field dropdown, select the name of the field whose value you want (this maps to what you called in the Collect data dialog box from above).
- In the "Find the List Item" section, select "Tasks:ID" in the Field dropdown.
- In the value field, click on the f(x). This opens yet another dialog box.
- Change the source "Workflow Data"
- Select the workflow variable that matches to the "Output to Variable" from the Collect data action.
- Click OK/OK and you’re done.
It looks like this for me:
At this point, you can now use that value in your workflow as required.
As a brief aside, I always create an appropriately named workflow variable of type "List Item ID" and use that instead of the auto-generated "collect1".
This "compare any data source" dialog set is used in several different places in SPD and is well worth mastering.