I have a list that contains several items in it and I have a really cool SharePoint Designer workflow that modifies the properties of the items (columns, permissions, etc..) when it runs. However, in SharePoint Designer I only have the options to run the workflow automatically when an item is created or when an item changes. Did I mention that when I said a few items, I really meant a few hundred items, if not more? I really don’t want to spend the next 2 days manually kicking off the workflow on each item in my list!
One possible solution is to add a Yes/No column to your list, do not add it to the default view, create a datasheet view of your list with the new column visible, and modify your workflow to reset the value in your new column once the workflow has ran. Once all of that is in place, go to your new datasheet view, set the value in the first row and copy it on down to the bottom. Let’s take this step-by-step:
1. Open your List or Document Library and click the List tab on the ribbon menu. Click on Create Column.
2. Give your column a name, something like Run Workflow and choose Yes/No (check box) as the type. Set the Default value to No and uncheck the Add to default view check box, then click OK.
3. On the ribbon, click on Create View, Click on Datasheet View, give your view a name like RunWorkflow, under Display make sure that the new column that you created (Run Workflow) and one other, generally I choose the Title field or any other field that is going to show a unique value for the items in the list is selected, then click OK.
4. Open the site that contains the list in SharePoint Designer, click on Workflows and then the workflow that you want to run.
5. On the workflow settings page make sure that Start workflow automatically when an item is changed is selected and then choose Edit Workflow.
6. Click on the screen above the first step of your workflow. Then in the Insert section of the ribbon click Step to add a new step to your workflow. You can rename the step so that it does not appear to be out of sequence with the other steps in your workflow.
7. Click on the Condition button on the ribbon and choose If current item field equals value.
8. Click on the field link and choose the column that you created in step 2. Then click on the value link and choose Yes.
9. Click Action on the ribbon and choose Set Field in Current Item.
10. Click on the field link and choose the column that you created in step 2 and then click the value link and choose No. Your step should look like this:
11. Save and Publish your workflow.