delete_record: Delete record

Description Usage Arguments Value Author(s) Examples

View source: R/page_records.R

Description

Delete a single record

Usage

1
delete_record(server_name, profile_id, page_id, record_id, access_token)

Arguments

server_name

String of the iFormBuilder server name

profile_id

Integer of the iFormBuilder profile ID

page_id

Integer ID of the page from which to delete the record.

record_id

Integer ID of the record to delete.

access_token

Access token produced by get_iform_access_token

Value

ID of the record deleted.

Author(s)

Bill DeVoe, William.DeVoe@maine.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Identify the last record added to the form so it can be deleted
record_to_delete = max(parent_form_records$id)

# Get access_token
access_token <- get_iform_access_token(
  server_name = "your_server_name",
  client_key_name = "your_client_key_name",
  client_secret_name = "your_client_secret_name")

# Delete the last record that was added
 deleted_record = delete_record(
   server_name = "your_server_name",
   profile_id = "your_profile_id",
   page_id = form_id,
   record_id = record_to_delete,
   access_token = access_token)

## End(Not run)

arestrom/iformr documentation built on Nov. 25, 2021, 11:21 p.m.