We are currently working on the forum. For the short-term, all forum content will be in read-only format. We apologize for the interruption and look forward to collaborating with you shortly. All the best in your research!
Rules on empty int fields
Hey Folks -
I'm trying to write a rule that looks at an INT field and checks to see if it's greater than 0. The problem is if the field is left blank the rule doesn't seem to return true or false. If I fill in the field with an integer the rule fires and I get true/false as expected. Delete the int from the field and the rule doesn't fire at all again. Here is the Rule:
Multiple Agent Variable Dosing
(SE_ENROLLMENT.F_BLJ_ENROLLME_6512.IG_BLJ_E_UNGROUPED_7499.I_BLJ_E_ENROLLDRUG2CYCLINGDAYSON_4606 ne "" and SE_ENROLLMENT.F_BLJ_ENROLLME_6512.IG_BLJ_E_UNGROUPED_7499.I_BLJ_E_ENROLLDRUG2CYCLINGDAYSON_4606 gt 0)
Steps I took to test this:
1. Set I_BLJ_E_ENROLLDRUG2CYCLINGDAYSON_4606 on the BLJ_ENROLLME_6512 form to 1 and save form
2. Load the event with I_RANDO_RCESDSCORE
3. Change some values and click save
4. I_RANDO_RCESDSCORE gets set as expected with "Is Multi V12"
5. Go back to the BLJ_ENROLLME_6512 form and delete the value for I_BLJ_E_ENROLLDRUG2CYCLINGDAYSON_4606 and save form
6. Go back to the even with I_RANDO_RCESDSCORE
7. Change some values and click save
8. I_RANDO_RCESDSCORE is not updated, still reads "Is Multi V12" instead of "Not Multi V12"
9. Repeat 1-3 but set the field to 0 and I_RANDO_RCESDSCORE is updated with "Not Multi V12"
I'm stumped as to why leaving the field blank means a rule won't fire against it. I thought that was what the ne "" would fix, but it didn't. I know I must be doing something wrong, but what is it? Any help is GREATLY appreciated. I'm running OpenClinica Community version 3.1.4.