Working with Document Sets using FileTransport and DataTransport
SharePoint Document Set is basically a “Special Folder” having multiple columns for metadata that applies to all files within the Set. The metadata columns available are defined by the Content Type of the Document Set
- Technically, each Document Set is a Document Library Item where:
[HTML File Type] = 'Sharepoint.DocumentSet'
General Document Set support information |
---|
|
|
|
- File Transport – Use FileShare or SharePoint to Create/Update/Delete/Recycle Doc Sets
-
Create a new Document Set - In the Folder column next to Document Library drop-down use the “Fusion colon syntax”
MyDocSetContentType:MyDocSet
This will create a Document Set named MyDocSet based on the Content Type MyDocSetContentType.
Create Documents Sets using any source folder level - To use source folder level 1 for creating the DocSet assign
[<Content Type ID>]
MyDocSetContentTypeName:1
- Dynamic: Create an expression on the column
[<Content Type ID>]
If( [ParentFolder 01] = '','My Doc Set Content Type Name','Folder')
Copy Document Sets from other SharePoint Document Library - Map the “Source”
[Content Type]
to “Target”[Content Type ID]
- If needed use expression or Search&Replace rules to define the correct new Content Type
Assign metadata to Document Set Items - Determine if the “Item being processed” is a Document Set, if yes assign it data else assign the file some data or skip the assignment
If( [HTML File Type] = "Sharepoint.DocumentSet", 'Some data..', 'Skip!' )
- Notice that the keyword
Skip!
will signal to ignore/skip the assignment
- Use the comprehensive DataTransport Component to update the Document Set Items with data from any data source. This video shows that in the second half
Use dynamic URL and create/update a specific Document Set - Use the “Fusion colon syntax”
MyDocSetContentType:MyDocSet
In the column “Redirection of SharePoint Target Site” use the below syntax https://abc.sharepoint.com/Shared%20Documents|MyDocSetContentType:MyDocSet
Determine if a source FileShare Item is Folder or File - Use the column
[File Type]
. Empty = Folder, other value is the file extension
If( [File Type] = "", 'Folder', 'File' )
Determine if a SharePoint Item is Folder/Document Set or File - Use the column
[File Type]
. Empty = Folder/DocSet, other value is the file extension
- Use the column
[Item Type]
. 0=File, 1=Folder/DocSet
If( [File Type] = "", 'Folder/DocSet', 'File' )
If( [Item Type] = 0, 'File' , 'Folder/DocSet' )
Determine if a SharePoint Item is a Document Set - If the Document Library column
[HTML File Type]
= ‘Sharepoint.DocumentSet’ then the Item is a Document Set
If( [HTML File Type] = 'Sharepoint.DocumentSet', 'A Doc Set', 'Something else' )
Convert Document Set to Folder - Assign the column
[<Content Type ID>]
the value “Folder”
Create Document Set and sub solders from a template - Use FileShare or SharePoint as source and point to a predefined structure and just copy that to the target. You can even create documents sets based of folder structure in FileShare .. see examples above.
Delete/Recycle Document Set - Use the same technique as when deleting/recycling Folders.
- Please note that DataTransport is by far more flexible and fast for delete/recycle operations
Convert List Items with attachments into Document Library Items in dynamically created Document Sets. - Each attachment becomes the file in a Document Library Item.
- Multiple attachments in same List item becomes multiple Items in the Document Library.
- All List Item columns can be used directly as metadata and/or used in calculated metadata for the files and/or the DocSet
- Attachment properties
[Created]
and[CreatedBy]
are available and can be mapped to the Document Library Item. - You do it using a simple construct of a DataTransport Component where you have the List with the attachments as source and in the For-Each-Row Target call a FileTransport Component. In the FileTransport Source use any SharePoint Document Library using the same SharePoint Connection as the Target and in the field
Redirect to URL
select the Parameter[<#Attachment URL>]
(Remember to select the column in the DataTransport Source)
- In the Folder column next to Document Library drop-down use the “Fusion colon syntax”
- Data Transport – Use any data source to Update/Recycle/Delete existing Doc Sets
-
From Data Transport’s perspective, Document Set Items are just List Items, and you can manipulate them like any other Item. DataTransport cannot create new Document Sets
Document Sets:[HTML File Type] = 'Sharepoint.DocumentSet'
Folders :[HTML File Type] = '' AND [Item Type] = 1
Determine if a SharePoint Item is Folder/Document Set or File - Use the column
[File Type]
. Empty = Folder/DocSet, other value is the file extension
- Use the column
[Item Type]
. 0=File, 1=Folder/DocSet
If( [File Type] = "", 'Folder/DocSet', 'File' )
If( [Item Type] = 0, 'File' , 'Folder/DocSet' )
Determine if a SharePoint Item is a Document Set - If the Document Library column
[HTML File Type]
= ‘Sharepoint.DocumentSet’ then the Item is a Document Set
If( [HTML File Type] = 'Sharepoint.DocumentSet', 'A Doc Set', 'Something else' )
- Use the column
Need more help with this?
DON'T HESITATE TO CONTACT US HERE ..