-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branching logic error - bug when original value is changed. #60
Comments
@dimitriscing would you mind providing your Project XML here? |
GithubProject_2022-10-17_1736.REDCap.zip @ChemiKyle auto_populate_fields is the only EM I have installed. Thank you for your help and support. |
@ChemiKyle We are experiencing similar problems after upgrading REDCap from 10.0.0 to 12.4.3 (and PHP from 6.8 to 7.4). Did you have the time to look into this issue? (or @dimitriscing, did you figure out a solution?) |
Hi @januz. Unfortunately I could not come up with a solution so I had to uninstall the module completely. However since most of the problems in my case occurred whenever a variable changed in a different instrument , I came up with a solution using the native Recap @if statement + @hidden action tags, in order to remove the annoying pop up message "ERASE THE VALUE OF THE FIELD". e.g. @if([projects(2)][current-instance] = '0' , @hidden , @default="[variable_a:checked:value][previous-instance]" ) |
@dimitriscing Thanks so much for getting back to me and describing your solution! @ChemiKyle Are there any plans to adapt the module for newer REDCap versions? |
I was able to recreate this error (thank you very much for the XML); I'm pretty sure I know where to look for the root of the issue (it's in frontend (i.e. JavaScript), so PHP upgrades won't make a difference). |
The second question in the photo above is only shown when the first question is answered “Yes” and the third question is only shown when the second question is “Yes”. The problem occurs when I change the first question to “No” or “Unknown” and I Save the form, then I get this message BRANCHING LOGIC ERRORS EXIST! There is definitely not a syntactical error in the branching logic as it is simple and straightforward.
I am facing similar problems in other instruments in the same project and the branched fields show errors when the original value is changed, and in some other cases they are cleared without any problems after the form is saved.
When I disable the external module the branching logic works okay, showing only the warning “ERASE THE VALUE OF THE FIELD” which is expected.
Interestingly, when I make the second question NON-Required the error message disappears.
Example number 2:
I have a field in the Annual Update General Information Instrument called Projects. Depending on which checkbox is checked in Projects, different fields are shown in other instruments in the same project. I check GenoMed and INHERENT and save Annual Update General Information. Then I go to Medical History and I save the instrument also. The issue occurs when I go back to to Annual Update General Information and uncheck GenoMed and INHERENT and then save the instrument. When I go to Medical History instrument and try to save it I get this error :
However the branching logic errors I receive are completely unrelated to the fields unchecked in the Annual Update General Information. The fields that are supposed to have errors, have their own branching logic but they are NOT connected to the field Projects . I get 25 error messages because of this and the user needs to click OK 25 times for the popup to go away. This happens only on the first Save. After the first save the issue goes away.
I am not sure why it is behaving like this selectively, and in some cases, it works fine and, in some others, I get this error.
I’ve used different browsers with the same results.
REDCap: 12.4.1 · PHP 7.4.3 (Linux/Unix OS) · MySQL 8.0.30 / Auto Populate Fields - v2.6.0
The text was updated successfully, but these errors were encountered: