dataset query name in a tableURL?

LabKey Support Forum (Inactive)
dataset query name in a tableURL? Ben Bimber  2010-11-29 14:15
Status: Closed
 
there is a reusable details page called detailsQueryRow.view. For a query, one might set a tableURL like this:

<tableUrl>/query/detailsQueryRow.view?schemaName=study&amp;query.queryName=obs&amp;lsid=${lsid}</tableUrl>

However, obs is just a string. When repeating this across a whole study, it would be nice to have a substitution for query name. Datasets already have a 'dataset' column, but this is the entityID of the dataset, not it's string name.

Can any of the following work:

1. I did not find a way to use a lookup in the URL. ie. query.queryName=${dataset/name}. is that possible?

2. Is there any sort of substitution that puts the name of your query into a URL like that?

thanks for the help.
 
 
jeckels responded:  2010-12-03 11:05
Hi Ben,

I just verified that it's not possible to include lookup values in the tableURL for a query. I opened a bug to make this possible in the future:

https://www.labkey.org/issues/home/Developer/issues/details.view?issueId=11344

There's no current substitution to drop in the name of the query. I assume you're primarily interested in this because you'd like to set the URL on study.studydata and have it apply to all the datasets? I don't think you should need to do this - in 10.3, I made the default details URL for study.studydata bounce you to the dataset-specific details page as appropriate for that row.

Thanks,
Josh
 
Ben Bimber responded:  2010-12-04 03:54
hi josh - that's almost right. we need to manually set a tableURL for each dataset anyway in the .query.xml file, since last i knew datasets did not have a default details page. most of the time i use that generic detailsQueryRow.view page.

however, for data entry and row updates I am ending up overriding the default insert/update pages with a custom one. i am for the large part using a single page for all, which accepts a URL param specifying dataset name. so we could make another page like the studydata details one that redirects the user to the right page based on dataset; however, this page would just be the same page plus a different URL param. ie:

/ehr/insertBatch.view?queryName=x
/ehr/insertBatch.view?queryName=y
/ehr/insertBatch.view?queryName=z