truncate_form: Truncate form

Description Usage Arguments Value Author(s) Examples

View source: R/page_records.R

Description

Removes all records from a page, leaving the page structure. USE WITH CAUTION!

Usage

1
truncate_form(server_name, profile_id, page_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 form to truncate.

access_token

Access token produced by get_iform_access_token

Value

Integer vector of the deleted record IDs

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
20
21
22
## Not run: 
# 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")

# Get the id of a single form in the profile given the form name
form_id <- get_page_id(
  server_name = "your_server_name",
  profile_id = "your_profile_id",
  page_name = "your_form_p",
  access_token = access_token)

# Delete all records in the form
truncated_ids <- truncate_form(
  server_name = "your_server_name",
  profile_id = "your_profile_id",
  page_id = form_id,
  access_token = access_token)

## End(Not run)

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