Description Usage Arguments Value Note
This function sends chained patch requests for each record found in the cds_df. These records have to be present at the moment of executing the underlying request. It will update all the fields present in the cds_df. The typical workflow for this function is to filter for records you are interested in, update the column values, select these columns and at the end of the pipe launch this function.
1 2 3 4 5 6 7 | update_cds_records(
cds_df,
cds_instance_name,
fail_safe_entity_name = NULL,
force_operation = FALSE,
exclude_null_cols = FALSE
)
|
cds_df |
A cds_df with records and columns for which you wish to update values in you CDS. It will be parsed using ‘parse_cds_enums(cds_df, to = ’key')' |
cds_instance_name |
A character scalar used in
|
fail_safe_entity_name |
A character scalar, bu default NULL. This argument is here to avoid calling this function accidentally in you analysis workflow. You need to provide the logical name of an entity from which you want to remove records (e.g. "contact", "task"). By default NULL to display a usefull warning instead of generic R's warning about an undefined parameter. |
force_operation |
A logical scalar indicating whether the optimistic concurrency check should be performed. This ensures that you are not changing records which changed after you downloaded them. Set to FALSE only if you know what you are doing! More info on optimistic concurrency control in the Web API can be found here. |
exclude_null_cols |
A logical scalar indicating whether columns with nulls should be included in a single record PATCH request. Especially useful if you have null lookup field in your data for certain records and you want to exclude just the to prevent the whole request from failing. |
List of httr requests objects for each record update. Useful to investigate whether all requests went through and repeat for those who did not.
All resulting PATCH requests prevent upsert operation by using the
If-Match: *
header, even if force_operation = TRUE
. See more
info about upsert operation in the Dataverse Web API
here.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.