Many of the view-building APIs
make use of data queries (e.g., dataset grid views) on your server. In order to reference a particular query, you need to identify its schemaName and queryName. To reference a particular custom view of a query such as a grid view, you will also need to specify the viewName parameter.
This section helps you determine how to properly identify your data source.
Check the capitalization of the values you use for these three properties; all three properties are case sensitive.
Query Schema Browser
You can determine the appropriate form of the schemaName, queryName and viewName parameters by using the Query Schema Browser
To view the Query Schema Browser, go to the folder of interest and select (Admin) > Developer Links > Schema Browser
The Query Schema Browser shows the list of schemas (and thus schemaNames) available in this container. Identify the schemaName of interest and move on to finding possible queryNames (see "Query List" section below).Example:
The Demo Study container defines the following schemas:
Any of these schemaNames are valid for use in the Demo Study.
To find the names of the queries associated with a particular schema, click on the schemaName of interest. You will see a list of User-Defined Queries
and a list of Built-in Queries and Tables
. These are the queryNames you can use with this schemaName in this container.Example
. For the Demo Study example, click on the study
schema in the Query Schema Browser. (As a shortcut you can visit this URL: https://www.labkey.org/query/home/Study/demo/begin.view?schemaName=study#sbh-ssp-study
You will see a list of User-Defined Queries
- Physical Exam + AverageTemp
- Physical Exam + TempDelta
And the list of Built-in Queries and Tables
associated with the study
The last (optional) step is to find the appropriate viewName
associated with your chosen queryName. To see the custom grids associated with a query, click on the query of interest, and then click view data
. This will take you to a grid view of the query. Finally, click the (Grid Views)
drop-down menu to see a list of all custom grids (if any) associated with this query.Example
For the Demo Study example, click on the Physical Exam
query name on this page
. Next, click view data
. Finally, click the (Grid Views)
icon to see all custom grids for the Physical Exam
query (a.k.a. dataset). You'll see at least the following query (more may be present):
- Grid View: Physical + Demographics
. For this example from the Demo Study, we would then use:
- schemaName: 'study',
- queryName: 'Physical Exam',
- viewName: 'Grid View: Physical + Demographics'