R
Russ Ramirez
With IP SP1, the behavior of rules when using the state of checkboxes does
not seem correct. For example, if I set a Rule on a checkbox to fill-in a
date on a date-picker control, the Rule fire on clicking the checkbox and the
today() function is applied to the date-picker - no problem. However, a rule
cannot be written to set the date-picker to blank. Curiously, if you leave
the checkbox checked and delete the date manually, then un-check the
checkbox, the rule applies again even though logically, it should not as the
condition "field1 is not blank" is not met.
Using a text box instead of a checkbox, the same rule works fine - i.e.
clearing the text does indeed allow the date-picker to be reset if you define
a 2nd Rule to do just that. It appears that the OnClick event for a checkbox
triggers the action specified by the rule regardless of the checkbox state.
Ironically, the practical application behind this scenario is the
construction of software development process forms whereby the test phases
like Unit Test, Integration, etc. are to be indicated by clicking the
checkboxes for each phase and then requiring a value in the corresponding
date-picker when checked. So it would be nice to simply set the "Cannot be
blank" validation for the date-picker when the checkbox is checked, and the
opposite when un-checked. I will probably have to script the OnClick handler
for the checkboxes to control the date-picker.
not seem correct. For example, if I set a Rule on a checkbox to fill-in a
date on a date-picker control, the Rule fire on clicking the checkbox and the
today() function is applied to the date-picker - no problem. However, a rule
cannot be written to set the date-picker to blank. Curiously, if you leave
the checkbox checked and delete the date manually, then un-check the
checkbox, the rule applies again even though logically, it should not as the
condition "field1 is not blank" is not met.
Using a text box instead of a checkbox, the same rule works fine - i.e.
clearing the text does indeed allow the date-picker to be reset if you define
a 2nd Rule to do just that. It appears that the OnClick event for a checkbox
triggers the action specified by the rule regardless of the checkbox state.
Ironically, the practical application behind this scenario is the
construction of software development process forms whereby the test phases
like Unit Test, Integration, etc. are to be indicated by clicking the
checkboxes for each phase and then requiring a value in the corresponding
date-picker when checked. So it would be nice to simply set the "Cannot be
blank" validation for the date-picker when the checkbox is checked, and the
opposite when un-checked. I will probably have to script the OnClick handler
for the checkboxes to control the date-picker.