queryTable
Description
Queries a form as a flat, two-dimensional table
Usage
queryTable(form, columns, ..., truncate.strings = TRUE)
Arguments
Argument | Description |
---|---|
columns | select columns, see Details |
truncate.strings | TRUE if longer strings should be truncated to 128 characters |
the | form to query. This can be an object of type "tree", "class", or the id of the form as a character. |
Details
To select columns, you can use
-
_id
to get the record identifier, -
_lastEditTime
to get the (Unix) timestamp (in seconds), -
the identifier of the form field (e.g.
ck849fbaw4
), -
the field code (e.g.
TOT_BNF
), -
the field label, enclosed in brackets if it contains spaces (e.g.
[Type of school]
) If you want to select a column in a reference form or in a parent form, use a period to create a path to the desired column. For example: -
parent._id
will select the identifier of the parent record and -
Camp.Name
will select the Name field in the Camp form.
References
Unix time, Wikipedia https://en.wikipedia.org/wiki/Unix_time
Examples
queryTable("a2145507918", columns = c(
id="_id",
name="Name",
campId="camp",
camp="Camp.Name",
governorate="Camp.Governorate.Name",
teachers="teachers",
students="students",
type="[Type of School]"
))