Create a new column definition based on an existing list
Source:R/sp_column_definition.R
copy_column_definition_list.RdArguments
- sp_list
A
ms_listobject or a data frame created byget_sp_list_metadata(). Optional if additional parameters are provided to...that can be used to get a SharePoint list to copy column definitions from.- ...
Arguments passed on to
get_sp_list_metadatalist_name,list_idSharePoint List name or ID string.
as_data_frameIf
TRUE, return a data frame with a "ms_list" column.get_sp_list()returns a 1 row data frame andlist_sp_lists()returns a data frame with n rows or all lists available for the SharePoint site or drive. Defaults toFALSE. Ignored ismetadata = TRUEas list metadata is always returned as a data frame.metadataIf
TRUE,get_sp_list()applies theget_column_infomethod to the returned SharePoint list and returns a data frame with column metadata for the list.keepOne of "all" (default), "editable", "external" (non-internal fields). Argument determines if the returned list metadata includes read only columns or hidden columns.
sync_fieldsIf
TRUE, use thesync_fieldsmethod to sync the fields of the localms_listobject with the fields of the SharePoint List source before retrieving list metadata.drive_name,drive_idSharePoint Drive name or ID passed to
get_drivemethod for SharePoint site object.driveA
ms_driveobject. Ifdriveis supplied,drive_nameanddrive_idare ignored.site_urlA 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.
callThe 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.siteA
ms_siteobject. Ifsiteis supplied,site_url,site_name, andsite_idare ignored.filterA string with an OData expression apply as a filter to the results. Learn more in the Microsoft Graph API documentation on using filter query parameters.
nMaximum number of lists, plans, tasks, or other items to return. Defaults to
NULLwhich sets n toInf.
Details
copy_column_definition_list() takes an existing SharePoint list and uses
the list metadata to create a column definition list that can be used to
create a new SharePoint list. Note: lookup columns retain the original lookup
list references so self-referencing lookup columns are copied as lookup
columns referencing the source list.