Filtering View/Report via URL

LabKey Support Forum
Filtering View/Report via URL Matt V  2018-02-05 16:29
Status: Closed
 
I have a DB constructed view combining a few datasets that other pages within a labkey instance link to. I'd like to pass a filter arg via the URL similar to how it's done with datasets (mentioned on https://www.labkey.org/Documentation/wiki-page.view?name=sortingData#url).

I've tried just a basic sort via reports.sort=ParticipantID, report.sort=ParticipantID, dataset.sort=ParticipantID, etc. However, sort doesn't seem to work with this view/repore let alone filtering. If I do the same on the dataset's URL it works. Is there a way to accomplish this for a view/report?
 
 
Jon (LabKey DevOps) responded:  2018-02-13 13:43
Hi Matt,

If you created a query that pulls in data from other tables, then it's probably going to be "query.sort=ParticipantId".

A quick way for you to tell is to bring up the grid view of what you created and look at the URL string in the address bar.

For example:

If it says "query-executeQuery.view", then it's a query and you would need to use "query.sort=ParticipantId".

If it says "study-dataset.view", then you would use "Dataset.sort=ParticipantId"

Regards,

Jon