Description
This function helps to create new form schemas for existing datasets.
Usage
createFormSchemaFromData(
x,
databaseId,
label,
folderId = databaseId,
keyColumns = character(),
requiredColumns = keyColumns,
logicalAsSingleSelect = TRUE,
logicalText = c("True", "False"),
codes = rep(NA_character_, ncol(x)),
upload = FALSE
)
Arguments
Argument | Description |
---|---|
x |
the data.frame or tibble for which to create form fields and a form schema |
databaseId |
the id of the database to which the form should belong. |
label |
the label of the new form |
folderId |
the id of the folder where the form should reside; defaults to the database id. This argument only has an effect if upload is TRUE. |
keyColumns |
a character vector of the column names of the form fields that should be form keys |
requiredColumns |
a character vector of the column names of the form fields that should be required |
logicalAsSingleSelect |
by default TRUE and converts logical columns in the data frame to a single select form field; if FALSE then it will convert TRUE to 1 and FALSE to 0 |
logicalText |
the single select replacement values for c(TRUE, FALSE); default is c("True","False") |
codes |
a character vector of field codes that must have the same length as the number of columns |
upload |
immediately upload the new form |