Hello Everyone,
I am writing another insurance exam using InfoPath 2007.
I am fairly experienced in this kind of task and have successfully designed several InfoPath templates for this purpose at our company.
I have text boxes for data entry, and rules to attribute scores based upon the data entered.
I would like to save time by using 'Contains' / 'Does not contain' rules using OR to set up multiple conditions quickly.
However I am finding that my rule doesn't work as expected; and I wondered if anyone could give me some advice on how to fix it.
Example Question "Name 3 sections of insurance provided by wintersports cover?"
The answer could be any one of 4 sections of insurance - equipment / hire / pack / avalanche
My rule is:
Set Condition
Field name Q25a contains "equipment" OR
Field name Q25a contains "hire" OR
Field name Q25a contains "pack" OR
Field name Q25a contains "avalanche"
Add Action
Set a fields value Q25aResult = 1
Set Condition
Field name Q25a does not contain "equipment" OR
Field name Q25a does not contain "hire" OR
Field name Q25a does not contain "pack" OR
Field name Q25a does not contain "avalanche"
Add Action
Set a fields value Q25aResult = 0
This is repeated over 3 fields QS2a / Q25b / Q25c
Test: "hire" is entered into field Q25a and a score of 1 is shown in field Q25aResult
HOWEVER - if "hire" is deleted and an incorrect word is entered, for example, "activity" the score of 1 still shows in Field Q25aResult
This is anticipates that someone sitting the exam might enter a correct answer but then change their mind and enter an incorrect answer.
Why is this?
There doesn't appear to be a conflict of rules.
In english I was hoping that the rule is saying "If the word equipment or hire or pack or avalanche is in the field then show 1 in the other field but if the word equipment or hire or pack or avalanche is not entered in the field then show 0 in the other field"
How can I make sure that the score shown in Field Q25aResult is 0 if the data entered is changed to an incorrect answer?
Is there a better solution?
Thanks so much for looking at my post,
Mike