Im sure this is a simple query for some but I cant seem to get my head around it.
I have a list view and in each row in the list I need to add an 'approver'. I want my workflow to start and send a task to the first approver in the list, once this is approved I want the next task to be sent to the approver in the second row and so on. I only want the second task to be sent once the first is completed. How would this look in a workflow?
Where do you store the approvers list data?
Say for instance, if the approver data is stored in the SQL table, normally the same pattern of approvers you added from list view will get saved inthe SQL table as well, meaning lests say, you have added apprvers, in the following pattern;
The same pattern it gets saved in the SQL table. Once the data is pushed in the table.
Then do follwing steps;
1. Now call the Approver smartObject list method in the DESTINATION USER of the client event.
2. Run Destination Rule in advanced mode, then select Plan One at a time
This will assign the task first to "Approver 1", once he finished the task, then it will assign the task to Approver 2 and then followed with Approver 3.
The whole trick here is "PLAN ONE AT A TIME"
Give a try and let me know if you have an issue.
Thanks for your reply. My problem is that there is no set limit for approvers, so there could be 1 approver or there could be 8, it will change each time. So the approvers are added to a list view and each row is created in the DB as a new line. In my rules I have:
For added rows on the list view
execute create SMO
start the workflow
So this creates a new line for each row in the list and starts the workflow for each row, however this now needs changed so the second row doesnt fire until the first is approved.
I hope I have explained ok.
Re. Set Data fields... I have approvers in a SharePoint list. When For-each loop fetches Approver column (defined of type "Person or Group"), I get an error. I think it's a bug. To workaround this, I thought I would get ID of list item in for-each loop and use ID to get approver and use it in User Task. Then I ran into another issue.. the reference for ID column (defined as integer in Sharepoint) that I created in For-each, shows as "Text" in context browser. So I couldn't use it in user task to get approver from approver list. To workaround this, I created that Set Data Fields to convert fetched ID to integer and store it in data field. Then I used ID (stored as integer in data field) to get approver. See Set Data Fields screenshot.
Since you are storing your approvers in SQL table, above workaround and bug may not be applicable to your design.
P.S. I posted about reference ID column being converted to text. You can see it here