Posts mit dem Label move item werden angezeigt. Alle Posts anzeigen
Posts mit dem Label move item werden angezeigt. Alle Posts anzeigen

Donnerstag, 3. Mai 2012

Move items into a SharePoint list folder

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:

  1. Add the "Create List Item" activity.
  2. Of the new item, set all field values to the ones of the current item.
  3. 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.)
  4. Afterwards delete the current item, so only the new one stays present.
Please note: The folder for the new item must already exist.
Of course you can also create completely new items inside a folder. :-)