Wanting Another Container Filter Type

LabKey Support Forum (Inactive)
Wanting Another Container Filter Type slangley  2012-03-29 13:49
Status: Closed
 
Of the container filters that are available, I thought, or hoped that the filter:

   'currentPlusProject: Include the current folder and the project that contains it

might behave this way:

  "Include all folders for which the user has read permission in the project that contains the current folder"

instead, it behaves this way:
   
  "Include the current folder and the the root folder of the project that contains it"

So, how about making a new container filter type that behaves the way I want it to. You could call it:

"allProjectFolders: Include all folders for which the user has read permission in the current project."

Thanks.

Scott
 
 
kevink responded:  2012-04-02 16:39
Hi Scott,

I think you can achieve this by using the currentAndSubfolders filter with the project as the container path. Something like this:

    LABKEY.Query.selectRows({
        schemaName: "study",
        queryName: "StudyProperties",
        containerPath: "/VISC",
        containerFilter: LABKEY.Query.containerFilter.currentAndSubfolders,
        columns: [ "Container", "Label" ],
        success: function (data) {
            // ...
        }
    });