Certain LabKey queries (such as assay designs, issue trackers, and survey designs) can be defined at the project level. Data associated with such queries may be located within individual subfolders. You can adjust the scope of queries on such data to cover all data on the site, all data for a project, or only data located in particular folders. Scope is controlled using the "Filter by Folder" option on the
(Grid Views) menu in the webpart.
This allows you to organize your data in folders that are convenient to you at the time of data collection (e.g., folders for individual labs or lab technicians). Then you can perform analyses independently of the folder-based organization of your data. You can analyze data across all folders, or just a branch of your folder tree.
You can set the scope through either the
(Grid Views) menu or through the client API. In all cases, LabKey security settings remain in force, so users only see data in folders they are authorized to see.
Folder Filter Interface
To filter by folder through the user interface:
- Select (Grid Views) > Filter by Folder.
- Choose one of the options:
- Current folder
- Current folder and subfolders
- All folders (on the site)
The LabKey API provides developers with even finer grain control over the scope.
config property available on many methods on LABKEY.Query
(such as LABKEY.Query.executeSql
) provides fine-grained control over which folders accessed through the query.
For example, the LABKEY.Query.executeSql
API allow you to use the containerFilter parameter to run custom queries across data from multiple folders at once. This query might (for example) show the count of NAb runs available in each lab’s subfolder if folders are organized by lab.