create_sp_list_column() adds a column to a SharePoint list and
delete_sp_list_column() removes a column to a SharePoint list.
update_sp_list_column() updates a column definition for an existing column
in a SharePoint list (but is not yet implemented).
Usage
create_sp_list_column(
sp_list = NULL,
...,
column_name = NULL,
column_definition = NULL,
list_name = NULL,
site = NULL,
site_url = NULL
)
update_sp_list_column(
sp_list = NULL,
column_name = NULL,
column_id = NULL,
...,
list_name = NULL,
column_definition = NULL,
column_name_type = "name"
)
delete_sp_list_column(
sp_list = NULL,
column_name = NULL,
column_id = NULL,
list_name = NULL,
column_name_type = "name"
)Arguments
- sp_list
A
ms_listobject. If supplied,list_name,list_id,site_url,site,drive_name,drive_id,drive, and any additional parameters passed to...are all ignored.- ...
Arguments passed on to
create_column_definitionnameColumn name.
.col_typeColumn type. Defaults to "text". Must be one of "boolean", "calculated", "choice", "currency", "dateTime", "lookup", "number", "personOrGroup", "text", "term", "hyperlinkOrPicture", "thumbnail", "contentApprovalStatus", or "geolocation".
enforce_uniqueEnforce unique values in column.
hiddenIf
TRUE, column will be hidden by default.deletableIf
TRUE, column can't be deleted separate from the list.requiredIf
TRUE, column will be required.defaultDefault value set by helper
get_column_default()function.descriptionColumn description.
displaynameColumn display name.
- column_name, column_id
Column ID for column to delete.
- column_definition
List with column definition created with
create_column_definition()or a related function. Optional ifcolumn_nameand any required additional parameters are provided.- list_name
List name. Required if
sp_listisNULL.- site
A
ms_siteobject. Ifsiteis supplied,site_url,site_name, andsite_idare ignored.- site_url
A SharePoint site URL in the format "https://[tenant name].sharepoint.com/sites/[site name]". Any SharePoint item or document URL can also be parsed to build a site URL using the tenant and site name included in the URL.
- column_name_type
"name" or "displayName". Used to match column ID so column_name must be unique if
column_name_type = "displayName".
Details
See documentation: https://learn.microsoft.com/en-us/graph/api/list-post-columns?view=graph-rest-1.0&tabs=http