Filter By Group in SQL Query Views

LabKey Support Forum
Filter By Group in SQL Query Views Matt V  2018-11-16 14:09
Status: Closed
 

We're currently using the "Filter by Group" functionality (https://www.labkey.org/Documentation/wiki-page.view?name=filteringData#group) for datasets and it's great. However, we have a few external schema sql queries with qviews that combine multiple datasets and would like to be able to use this same functionality.

I created a <module>/resources/queries/myview.query.xml file, the corresponding qview, and attempted to add the "filter" option or simply set includeStandardButtons to true, but it appears "Filter" doesn't exist for views.

Is this correct or is there a way to replicate/enable that functionality for queries?

Thanks!

 
 
Jon (LabKey DevOps) responded:  2018-11-30 14:28
Hi Matt,

The filter option is not apart of the standard button bar and is something that is unique to datasets via the study module.

However, you could construct your own buttons and use your own code while leveraging our Javascript APIs to build something yourself that could provide similar functionality as the dataset filtering you're looking to have on non-dataset tables:

https://www.labkey.org/Documentation/wiki-page.view?name=customButtonBars
http://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.QueryWebPart.html#constructor

Regards,

Jon