Learn R Programming

Rlabkey (version 3.3.0)

labkey.getQueryViews: Retrieve a list of available named views defined on a query in a schema

Description

Fetch a list of named query views available to the current user in a specified folder context, schema and query

Usage

labkey.getQueryViews(baseUrl, folderPath, schemaName, queryName)

Value

The available views for a query are returned as a three-column data frame, with one row per view output field.

viewName

The name of the view, or NA for the default view.


fieldName

The name of a field within the view, as defined in the query object to which the field belongs


key

The name of the field relative to the base query, Use this value in the colSelect parameter of labkey.selectRows().


Arguments

baseUrl

a string specifying the address of the LabKey Server, including the context root

folderPath

a string specifying the hierarchy of folders to the current folder (container) for the operation, starting with the project folder

schemaName

a string specifying the schema name in which the query object is defined

queryName

a string specifying the name the query

Author

Peter Hussey, peter@labkey.com

Details

Queries have a default “view” associeated with them, and can also have any number of named views. A named query view is created by using the “Customize View” button option on a LabKey data grid page. Use getDefaultViewDetails to get inforation about the default (unnamed) view.

References

https://www.labkey.org/Documentation/wiki-page.view?name=savingViews

See Also

labkey.selectRows, makeFilter, labkey.executeSql, labkey.updateRows, labkey.insertRows, labkey.importRows, labkey.deleteRows, labkey.getSchemas, labkey.getQueries, labkey.getQueryDetails, labkey.getDefaultViewDetails, labkey.getLookupDetails

Examples

Run this code
if (FALSE) {

## List of views defined for a query in a schema
# library(Rlabkey)

viewsDF <- labkey.getQueryViews(
	baseUrl="http://localhost:8080/labkey",
	folderPath="/apisamples",
	schemaName="lists",
	queryName="AllTypes"
)

}

Run the code above in your browser using DataLab