R: Retrieve the fields of a LabKey query view

labkey.getDefaultViewDetails {Rlabkey} | R Documentation

## Retrieve the fields of a LabKey query view

### Description

Fetch a list of output fields and their attributes that are avaialble from the default view of a given query

### Usage

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

### Arguments

`baseUrl` | a string specifying the `baseUrl`for the labkey server
`folderPath` | a string specifying the `folderPath`
`schemaName` | a string specifying the `schemaName` for the query
`queryName` | a string specifying the `queryName`

### Details

Queries have a default “views” associeated with them. A query view can describe a subset or superset of the fields defined by the query. A query view is defined by using the “Customize View” button option on a LabKey data grid page. `getDefaultViewDetails` has the same arguments and returns the same shape of result data frame as `getQueryDetails`.The default view is the what you will get back on calling `labkey.selectRows` or `getRows`.

### Value

The output field attributes of the default view are returned as a data frame. See `labkey.getQueryDetails` for a description.

### Author(s)

Peter Hussey, peter@labkey.com

### See Also

Retrieve data: `labkey.selectRows`, `makeFilter`, `labkey.executeSql`
Modify data: `labkey.updateRows`, `labkey.insertRows`, `labkey.importRows`, `labkey.deleteRows`
List available data: `labkey.getSchemas`, `labkey.getQueries`, `labkey.getQueryViews`, `labkey.getQueryDetails`, `labkey.getLookupDetails`

### Examples

    ## Details  of fields of a default query view
    # library(Rlabkey)

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

    queryDF

[Package Rlabkey version 2.3.0 Index]