Learn R Programming

redcapAPI (version 2.7.4)

exportNextRecordName: Generate Next Record Name from a REDCap Database

Description

To be used by projects with record auto-numbering enabled, this method exports the next potential record ID for a project.

Usage

exportNextRecordName(rcon, ...)

# S3 method for redcapApiConnection exportNextRecordName( rcon, ..., error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Value

Returns the maximum integer record ID + 1.

Arguments

rcon

A REDCap connection object as generated by redcapConnection

...

Arguments to be passed to other methods.

error_handling

An option for how to handle errors returned by the API. see redcap_error

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

list Additional API parameters to pass into the body of the API call. This provides users to execute calls with options that may not otherwise be supported by redcapAPI.

REDCap API Documentation

NOTE: This method does not create a new record, but merely determines what the next record name would be.

REDCap Version

8.1.8+

Author

Xuefei Jia

Details

It generates the next record name by determining the current maximum numerical record ID and then incrementing it by one.

References

Please refer to your institution's API documentation.

Additional details on API parameters are found on the package wiki at https://github.com/vubiostat/redcapAPI/wiki/REDCap-API-Parameters