OuhscBbmc / REDCapR

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

Unexpected Behavior: `redcap_write` and `redcap_write_oneshot` run without error in R but records are not uploaded to REDCap #515

Closed DOH-EKP0303 closed 6 months ago

DOH-EKP0303 commented 7 months ago

R Version: 4.3.1 REDCap Version: 13.7.22 REDCap project user rights: Export permissions for the 'Full Data Set' REDCap API user rights: Export, import REDCapR Version: 1.1.0

Bug Description: When uploading records using redcap_write and redcap_write_oneshot R provides the success message "x records were written to REDCap in x seconds." However, when checking in the REDCap project and project log the records are not there and show no history of the API call.

When using redcap_write and redcap_write_oneshot all optional arguments are left at default.

I am not sure if this issue is due to a bug in REDCapR or a bug with our REDCap instance. However, when uploading records to this same REDCap project using PyCap or using the REDCap native API in R, the records are successfully uploaded.

DOH-EKP0303 commented 6 months ago

Issue solved: I was uploading records that already existed in the REDCap project with no changes made to any of their fields. Because this import was not updating any records or creating new records it did not appear on the REDCap log.

wibeasley commented 6 months ago

huh. I would have predicted that wrote to the log anyway. Thanks for digging into it.

kileyyeaman commented 4 months ago

Hi there! I know this issue is closed, but I encountered the same issue on one of my scripts that runs on a cron job. It took me quite some time to figure out. This might be a big ask, but is there anyway the success message could be altered in the future? Something like "x records were identical, so they were not uploaded to REDCap" would be helpful for debugging!