ms_list_item {Microsoft365R}R Documentation

SharePoint list item

Description

Class representing an item in a SharePoint list.

Format

An R6 object of class ms_list_item, inheriting from ms_object.

Fields

Methods

Initialization

Creating new objects of this class should be done via the get_item method of the ms_list class. Calling the new() method for this class only constructs the R object; it does not call the Microsoft Graph API to retrieve or create the actual item.

See Also

ms_graph, ms_site, ms_list

Microsoft Graph overview, SharePoint sites API reference

Examples

## Not run: 

site <- get_sharepoint_site("My site")
lst <- site$get_list("mylist")

lst_items <- lst$list_items(as_data_frame=FALSE)

item <- lst_items[[1]]

item$update(fields=list(firstname="Mary"))

# item data (plus some metadata mixed in)
item$properties$fields

item$delete()


## End(Not run)

[Package Microsoft365R version 2.4.0 Index]