OuhscBbmc / REDCapR

R utilities for interacting with REDCap
https://ouhscbbmc.github.io/REDCapR
Other
114 stars 47 forks source link

add new `force_auto_number` paramter to `redcap_write()` #519

Open wibeasley opened 8 months ago

wibeasley commented 8 months ago

Alexander Maclay posted a problem that could be avoided if REDCapR added a new-ish parameter forceAutoNumber when writing records to the server.

forceAutoNumber If record auto-numbering has been enabled in the project, it may be desirable to import records where each record's record name is automatically determined by REDCap (just as it does in the user interface). If this parameter is set to 'true', the record names provided in the request will not be used (although they are still required in order to associate multiple rows of data to an individual record in the request), but instead those records in the request will receive new record names during the import process. NOTE: To see how the provided record names get translated into new auto record names, the returnContent parameter should be set to 'auto_ids', which will return a record list similar to 'ids' value, but it will have the new record name followed by the provided record name in the request, in which the two are comma-delimited. For example, if

  • false (or 'false') - The record names provided in the request will be used. [default]
  • true (or 'true') - New record names will be automatically determined.

Private forum post: https://redcap.vanderbilt.edu/community/post.php?id=221892