Document library in Related item control

rss

Posted by RMIC - Jun 1 ’15 at 09:43

Hello,

 

I have in the "Related item control" a document library. This document library has several folders.

These folders can have subfolders. The number of subfolders depend on the selected data set, which is in the SP form.

What is the best handling and assignment of documents to a folder? (possibly Rootfolder (property that is visible in IE debugger)? If so, how? or more document libraries ..)

When I'm in a subfolder, how do I back to the main folder  (except the back button of the browser)?

When I click on a folder, I land in another tab and must again click in the actual tab. How do you get around?

 

In another tab I have a document library, which should not be edited. Edit I've disabled. Nevertheless, it is possible to add documents via drag & drop. Why?

 

Many Thanks!

I have SP-2013 and Form Designer 2.9.1.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #1 by Dmitry Kozlov Jun 2 ’15 at 08:18

    Hi,

    I'd recommend to display related documents without folders. You can retrieve all documents relating to the current item recursively by adding the following attribute to the View element: Scope="RecursiveAll". To add this attribute, please, select the Related items control in Forms Designer and open its View property.

    If you need to group documents relating to the current item, say by folder, content type or field value, I'd recommend to use different libraries for different types of documents and display them in separate Related items controls. Or you can create multiple views for the same library and display different views in separate Related items controls.

    As for uploading documents via drag & drop, you can disable this functionality by adding an HTML-control with the following content onto your form:

    <script type="text/javascript"> 
          WPQRegisterDragDropUpload = function() {} 
    </script>
  • RMIC
    Member
    Member for: 4 years 7 months
    #2 by RMIC Jun 2 ’15 at 09:54
    Hi Dmitry, Thanks a lot for your help! With the Scope = "RecursiveAll" and disable the Drag and drop works. Thank you! The multiple of document libraries are advantageous, I thought so. Through the use of several libraries I already save me a few folders. But when I use no subfolders, it may partially be a bit confusing because it can be a lot of documents. Should I use subfolders, there is a way, if I'm in the subfolder to come back (within the SP-FORM)?
  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #3 by Dmitry Kozlov Jun 3 ’15 at 11:27

    [#2]: Unfortunately, SharePoint doesn't allow to navigate through folders for multiple libraries on the same page. That is why, I recommend you to avoid folders in Related items controls. But if you have a lot of documents in the library, you can group them by a field in the view settings to simplify navigation through them. Next, use this view in the Related items control.

  • RMIC
    Member
    Member for: 4 years 7 months
    #4 by RMIC Jun 4 ’15 at 01:53

    [#3]: Thanks Dmitry.

    Then I'm going to do with groups.

     

    For testing purposes, I have a document library in a Related item control with folder.

    When I'm in a folder and I want to back, I built me a link to an HTML-control:

    <a href="javascript:history.go(-1)"> back </a>

    Is certainly not a good way. But to test it enough.

    With this link, I'll come back out of the folder, but land in another tab (always in the first - so far left) within the Related item control.

    Even if I click on a folder, I land in a different tab.

    How can I prevent that? I want to always be in the same tab.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #5 by Dmitry Kozlov Jun 4 ’15 at 05:18

    [#4]: Hi,

    Please, put the following code into the JS-editor. Replace the tab index (2) with zero-based index of the tab containing the Related items control.

    if (GetUrlKeyValue('RootFolder')) {
    	$('#fd_tabcontrol-0').tabs('option', 'active', 2);
    }
    
  • RMIC
    Member
    Member for: 4 years 7 months
    #6 by RMIC Jun 5 ’15 at 07:35

    [#5]:  This works, thanks.

    Is it possible, by a 'Related item control' the column names to hide? So that only the data is visible.

    Is it possible to count the number of items (or rows)  in a Related item control?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #7 by Dmitry Kozlov Jun 8 ’15 at 05:17

    [#6]: Hi,

    1. Yes, you can hide the header with the help of JSLink:

    http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views

    2. Please, follow the instructions to output the number of rows in the related items:

    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html

  • Dmitriy_F
    Member
    Member for: 2 years 8 months 6 days
    #8 by Dmitriy_F Apr 28 ’17 at 01:01

    I have a list form and a document library as related item. How can i set auto-fill field Related_ID (in document related library) = id (my list form) in case of drag and drop documents?

Displaying 1 to 8 of 8 messages