Skip to main content


Folder Structure Management



  • Christof

    Hi Nicole

    There's a "Create new folder" Action available which can be configured on buttons to create a folder (configure multiple Actions for multiple folders).
    For your case create on the NewForm several "Create new folder" Actions on the "Save" button after the existing "Save Form" Action.

    You can even read folders from a "template library" and create per returned folder a new folder inside new Dossier's folder:

  • Nicole

    Hello Christof.

    can you show me how you get the items of the template folder in this action as example?


    Kind regards


  • Christof

    Hi Nicole

    Sure, it's just the "Get items" action with default parameters like the library containing the template folders:

    Library with template folders:

  • Christof

    If you have more than just one level of folders in the folder structure - use the following expression on the Folder parameter of Create new folder action:

    var filePathParts = [[@Actions.Loop_apply_to_each.CurrentItem]].FileRef.split('/');
    var libindex = filePathParts.findIndex(element => element == 'InternalNameOfYourTemplateFolderLibrary');
    filePathParts.splice(0, libindex+1); //remove part to library
    var libRelFolderPath = filePathParts.join('/');
    var dossierFolderPath = [[@Web.GetFirstValueForQuery([[@Web.ServerRelativeUrl]]+'/InternalNameOfYourTargetLibrary', '<Where><And><Eq><FieldRef Name="LookupToDossier" LookupId="TRUE" /><Value Type="Lookup">'+[[@Actions.Save_Form.ItemID]]+'</Value></Eq><Eq><FieldRef Name="FSObjType" /><Value Type="Integer">1</Value></Eq></And></Where>', 'FileRef')]];
    return dossierFolderPath.substring(dossierFolderPath.lastIndexOf('/')+1,dossierFolderPath.length)+"/"+libRelFolderPath;

    ! replace the bold written names with the names of your own libraries/column


Please sign in to leave a comment.