as_column_definition() validates a named list of Microsoft Graph
columnDefinition properties, such as a column read from a YAML file with
read_sp_list_yaml() or returned by create_column_definition().
A column definition must have a name and exactly one column type key
(e.g. text, choice, or dateTime) holding the properties for that type.
Property names must match the Graph API documentation. Unknown properties
and read-only properties (e.g. type) are errors. A column id is allowed
as a reference to an existing column but isn't used to match, create, or
update columns. A custom element is allowed and isn't validated, so it
can hold metadata used by other applications.
Formulas for calculated columns, default values, and validation have a
leading "=" added if missing. Unlike create_calculated_column(), the
formula isn't processed with glue::glue().
Arguments
- x
A named list of columnDefinition properties.
- ...
Must be empty.
- allow_custom
If
TRUE(default), allow acustomelement.- call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.
Value
The validated column definition x with choices converted to a
character vector and formulas normalized.
See also
read_sp_list_yaml()for the YAML format that uses these definitions.