collapse_list_with_dupe_names: Collapse Elements in List with Same Name

collapse_list_with_dupe_namesR Documentation

Collapse Elements in List with Same Name

Description

This function looks for instances of elements in a list that have the same name and then combine them all into a single comma separated character string (referenceTo) or tbl_df (picklistValues).

Usage

collapse_list_with_dupe_names(x)

Arguments

x

list; a list, typically returned from the API that we would parse through

Value

A list containing one row per field for the requested object.

Note

The tibble only contains the fields that the user can view, as defined by the user's field-level security settings.

Examples

## Not run: 
obj_dat <- sf_describe_objects(object_names = "Contact", api_type = "SOAP")[[1]]
obj_fields_list <- obj_dat[names(obj_dat) == "fields"] %>% 
  map(collapse_list_with_dupe_names)

## End(Not run)

salesforcer documentation built on March 18, 2022, 6:26 p.m.