Create SharePoint list lookup column and update lookup column items
Source:R/sp_list.R
create_sp_list_lookup_column.Rdcreate_sp_list_lookup_column() is a wrapper for create_lookup_column()
and create_sp_list_column() that allows for the creation of a column in one
list (the "lookup" list) and then create a lookup column in a second list.
Usage
create_sp_list_lookup_column(
column_name,
sp_list = NULL,
lookup_list = NULL,
lookup_list_column = column_name,
sp_lookup_list = NULL,
list_name = NULL,
site = NULL,
site_url = NULL,
...
)
update_sp_list_lookup_items(
sp_list = NULL,
data = NULL,
column_name,
lookup_list_data = NULL,
lookup_list = NULL,
join_column = column_name,
...,
.id = "id",
na_fields = c("drop", "replace"),
.progress = TRUE,
call = caller_env()
)Arguments
- sp_list
A
ms_listobject. If supplied,list_name,site, andsite_urlare all ignored.- lookup_list_column
Name of lookup column in the lookup list to use.
- 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.
- ...
Arguments passed on to
create_lookup_columnallow_multipleIf
TRUE, allow lookup column to return multiple values.allow_unlimited_lengthIf
TRUE, allow lookup column to return any length value.primary_lookup_column_idIf column definition is for a secondary column, the primary lookup column ID must be supplied.