How-To: Move items into a folder using a SPD workflow
In one tutorial I explained how to create folders using a SPD workflow. Only having folders when you still need to create all items in the according folder manually doesn't make too much sense.So I figured out how to move items into folders using SPD workflows.
What do you need?
All you need to do before moving items is to assign the folder content type to the according lists. How this can be done is explained here.Let's get it done
Actually there is no standard workflow activity moving items. So we are going to use the "Create List Item" activity. You might think "Copy List Item should also work.". Well, actually, it does not work for this purpose since you cannot change any fields of the item to be moved.So here is how you move items:
- Add the "Create List Item" activity.
- Of the new item, set all field values to the ones of the current item.
- Additionally, set the field "Folder" to the name of the folder where the new item should be placed in. (This is where "Copy List Item" would fail.)
- Afterwards delete the current item, so only the new one stays present.
Of course you can also create completely new items inside a folder. :-)