Conditonal Argument in a Form

T

tkozan

Hi Everyone,

I have a form with mutliple views. On each view is a check box that
needs to filled in order for that view to be complete and finished.

What I'd like to do is add a field or control that indicates all the
checkboxes across all the views are complete when all the checkboxes
are marked. Basically a control or field that says all checkboxes are
checked otherwise it is displayed as false.

This way i'll know that the form is complete and then i can pull this
control into a sharepoint form library view.

I've been playing around with the expression box and the conditional
formatting but haven't had any luck.

Ideas or suggestions welcome!

Thank you.

Todd
 
S

S.Y.M. Wong-A-Ton

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.
 
D

Deborah Jean

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


S.Y.M. Wong-A-Ton said:
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,

I have a form with mutliple views. On each view is a check box that
needs to filled in order for that view to be complete and finished.

What I'd like to do is add a field or control that indicates all the
checkboxes across all the views are complete when all the checkboxes
are marked. Basically a control or field that says all checkboxes are
checked otherwise it is displayed as false.

This way i'll know that the form is complete and then i can pull this
control into a sharepoint form library view.

I've been playing around with the expression box and the conditional
formatting but haven't had any luck.

Ideas or suggestions welcome!

Thank you.

Todd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top