recordsManagementMethods {redcapAPI} | R Documentation |
Export Next Record Name or Rename a Record
Description
These methods enable the user to get the next record name (when auto numbering is enabled) or rename and existing record.
Usage
exportNextRecordName(rcon, ...)
renameRecord(rcon, record_name, new_record_name, arm = NULL, ...)
## S3 method for class 'redcapApiConnection'
exportNextRecordName(
rcon,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
## S3 method for class 'redcapApiConnection'
renameRecord(
rcon,
record_name,
new_record_name,
arm = NULL,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
Arguments
rcon |
A |
record_name |
|
new_record_name |
|
arm |
|
... |
Arguments to pass to other methods |
error_handling |
|
config |
A named |
api_param |
A named |
Value
exportNextRecordName
returns an integerish value. The value is
determined by looking up the highest record ID number in the
project and incrementing it by 1.
renameRecord
invisibly returns a logical value that indicates if the
operation was successful. Otherwise, an error is thrown.
Functions
-
exportNextRecordName()
: Get the ID number for the next record to be created. -
renameRecord()
: Rename an existing record.
See Also
exportRecords()
,
exportReports()
,
importRecords()
,
deleteRecords()
,
exportRecordsTyped()
,
exportReportsTyped()
Examples
## Not run:
unlockREDCap(connections = c(rcon = "project_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
# Get the next record name
exportNextRecordName(rcon)
# Rename an existing record
renameRecord(rcon,
record_name = "1",
new_record_name = "42")
## End(Not run)