vanderbilt-redcap/auto-record-generation

Error in producing new records -- some records only

shffer opened this issue · 5 comments

I am using AutoRecord Generation v1.7 with REDCap 10.0.6. and have run into an issue with migrating records. There are currently three projects in production and there were no issues migrating between the first and second. However, migrating between the second and third is causing an issue for some records only. If it was all of them, I would assume that I have configured something incorrectly but the fact that it is only some of them has left me scratching my head. It is also the same configuration that I have used to successfully migrate records between the first and second projects. The variable [bl_create] is supposed to trigger the creation of a new record and migrate across a few variables:

image

This has worked for some IDs but for others produces the following error;

_The Auto Record Generation module could not copy values for record 81 from project 565 to project 1516 because of the following error(s):

[
"81","record_id","81","The value is not a valid category for record_id"
]_

I've exported the data and can't see anything different/weird about the way the record IDs are stored for those whose migration works and those who throw an error.

Does anyone have any insight into what could be going on?

Without access to the projects themselves, I can only do a little speculation. That error should only be happening if the field name indicated in the destination project does not support the value you're trying to send it. This most typically means the field validations are different between projects. I assume the "record_id" field in project 1516 is the real record ID field for that project. If so, my other thought would be a potential conflict with record ID autonumbering. There's also potential that there's some strange hidden characters being passed over, but I would imagine those should be caught in multiple places already.

Thanks for the input. Yes, "record_id" is the actual record ID for both projects (both called [record_id]) and neither has any validations assigned. Autonumbering was off in the destination project but I've tried it with it on and receive the same error for the same records. Is there a way to check if there are hidden characters in some of the IDs? I had the same thought since it is only tripping up with some IDs but I could only think of checking exported data and nothing seemed off there.

I wouldn't have thought it's relevant but it's working for the single-digit IDs in the project but not the double-digits.

I can't seem to duplicate the issue on our end of things.
For checking the real text of the record ID, you could data export to a CSV and open it in notepad. I believe that would show more odd characters if they existed. But since the variable is a record ID being autogenerated by REDCap, I don't believe that it being formatted strangely is even possible.

It was (of course) a silly error on our part. Someone had pasted choices from another variable into the 'Choices, Calculations, OR Slider Labels' field for the record id in the data dictionary. I didn't even think it was possible to have categories in the official id column and the online editor doesn't show that field at all. The low ID numbers were mapped to category options which is why it was seemingly working for those.

Thanks for your help and sorry to waste your time!

I'm just glad it got resolved!

Whenever that error shows up when trying to move data, it is the result of the field have a different type (text vs. radio button) or having validation or choice requirements that don't line up. As you mentioned, the record ID field shouldn't have any choice options so it threw me off as well to see the error in that context.

I'll mention to the REDCap team that this situation can occur. It could possibly interfere with other functions within REDCap itself if it happens to someone (and they'd have no real way of knowing!).