possible problem with views and embedded QWP?

LabKey Support Forum (Inactive)
possible problem with views and embedded QWP? Ben Bimber  2010-07-20 15:39
Status: Closed
 
we have a dataset called chemistryResults. We have a file-based default view that uses a lookup to join in some extra columns.

you can go directly to that query here and see those columns:
https://xnight.primate.wisc.edu:8443/labkey/study/WNPRC/EHR/dataset.view?datasetId=1056

we have a page that loads a QWP of the same query here:
https://xnight.primate.wisc.edu:8443/labkey/EHR_Reporting/WNPRC/EHR/animalHistory.view?participantId=r89033&report=34&showReport=1

the code behind this does not specify a viewName. however, this embedded QWP loads with a generic default view, not the default view specified by our file. is that a bug or am i doing something wrong? thanks for the help.
 
 
Ben Bimber responded:  2010-07-22 14:03
here's some more info. there's 2 distinct problems here:

I tried to load the QWP with a named file-based view (instead of a ".qview" file). When you load a QWP with a view name, there is usually a piece of text that says what view is loaded. I do not see this with my embedded QWP, which suggests labkey was not finding my file-based view.

The name of this query is 'chemistryResults' and it's label is 'Blood Chemistry Results'. I had the original .qview file in a subfolder named 'Blood Chemistry Results'. Using the label as foldername is required for this view to appear when i load the dataset using dataset.view.

If I create a copy of my file-based qview file in a second folder called chemistryResults, then we have some progress. The embedded QWP now says 'The view Plus Ref Range is filtered....' (indicating it found the qview file). The first problem is that LabKey isnt consistent about whether it wants the file-based view to be located in a subfolder named using dataset name or dataset label.

Here's the second problem:

i have a file-based metadata XML file for this query. in this file, I wrap one of the columns in dataset and lookup to a second query. in my custom view, I try to load these joined columns. Labkey wasnt finding this file, hence ignoring the columns. This file was named 'Blood Chemistry Results.xml'. I made a copy called 'chemistyResults.xml' and it all worked.

Any suggestions here? Different places seem to expect different naming conventions for files. Until that's fixed do I need two copies of all those?
 
jeckels responded:  2010-07-23 11:31
For the record, this problem is resolved if the QueryWebPart requests the dataset table by its label, not by its name. For historical reasons, the dataset's label is the canonical table name. The dataset's name is really treated as an alias.

Thanks,
Josh