What does your data source look like? Are the checkboxes in a group? If they
are, there might be an easier way to do it than what I'm going to describe
now.
I think a "trick" that I've successfully implemented several times could
work for your scenario. Try the following:
- Add a field called "helperField" of type Text (string) to your form.
- Add a rule to each one of the checkboxes in the views. This rule must have
2 actions:
1. Set a field's value: helperField = ""
2. Set a field's value: helperField = "check"
- Add a new checkbox to the form; we will call it "allCheckBoxesChecked" for
now. This checkbox will be checked when all the checkboxes in the views have
been checked.
- Create a rule on the "helperField" with an action that says:
Set a field's value: allCheckBoxesChecked = "FALSE"
- Add a condition to this rule ([Condition] button on "Rule" dialog box)
that checks whether any of the checkboxes have not been checked, i.e. have
value "FALSE". So the condition must look something like
checkbox1 = "FALSE" or checkbox2 = "FALSE" or .....
- Create a second rule on the "helperField" with an action that says:
Set a field's value: allCheckBoxesChecked = "TRUE"
- Add a condition to this rule that checks whether all the checkboxes have
been checked, i.e. have value "TRUE". So the condition must look something
like
checkbox1 = "TRUE" and checkbox2 = "TRUE" and ....
So now you have kind of an "intermediary" between the checkboxes in the
views and the allCheckboxesChecked field. This intermediary (=helperField)
will be triggered whenever the value of one of the checkboxes in the views
changes (checkbox is checked or unchecked) and then determine whether the
value of the allCheckboxesChecked field should be set to "TRUE" or "FALSE"
based on the values of all of the checkboxes in the views.
I've written this from the top of my head, so haven't tested it. You can try
it and see if it works.
---
S.Y.M. Wong-A-Ton
> Hi Everyone,
>
[quoted text clipped - 17 lines]
>
> Todd
Deborah Jean - 05 Feb 2006 16:53 GMT
Thanks for letting me steal another answer from you, when I start teaching it
this spring I'm sure you'll either have already answered all my questions or
I'll be bugging you alot.
Deborah Jean
> What does your data source look like? Are the checkboxes in a group? If they
> are, there might be an easier way to do it than what I'm going to describe
[quoted text clipped - 58 lines]
> >
> > Todd