Learn R Programming

Rlabkey (version 2.1.121)

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)

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

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() .}

cr

List available data:

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/wiki/home/Documentation/page.view?name=savingViews

See Also

{Retrieve data: } labkey.selectRows,makeFilter, labkey.executeSql Modify data:

Examples

Run this code
## 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