vubiostat / redcapAPI

R interface to REDCap (http://www.project-redcap.org/)
21 stars 27 forks source link

exportBulkRecords() Pulling forms that do not exist #404

Open zbudesa opened 4 months ago

zbudesa commented 4 months ago

I am having an issue where using the exportBulkRecords() function is pulling data that is mostly blank as part of the export. When checking that combination of record, event, and form, the form itself is completely blank (no data entered and the indicator on REDCap is clear/empty and the "complete" indicator says the form is incomplete. I have not found any logic or pattern which seems to govern these. Using in fairly complex project, but happens when only a single form in in the event.

spgarbet commented 4 months ago

Is there a checkbox on this form perhaps?

zbudesa commented 4 months ago

The form does have check boxes. This has only recently become a problem after updating the package, as well.

spgarbet commented 4 months ago

Okay, this is complex and a work in progress on that issue. The root problem is that a checkbox always has a value. If one filters rows out of a result set by whether it has any values or not, checkboxes always pop out as having value. Thus the empty rows you see are technically by definition correct because they contain values for the simple fact they have a checkbox. Issues #5, #349 and draft PR #403 all relate to this.