However, although InfoPath is a great program, it is not intuitive. In fact, sometimes it is downright annoying. (Although I am sure the same can be said for SharePoint at times, right?)
I was working with a existing form that I needed to modify and I wanted to add some conditional formatting to make certain sections display when the option button selected was "Yes" and to disappear from view when the option button selected was "No." The challenge I ran into was that I could make the section disappear when "No" was selected, but if the user had inadvertently clicked on an option button in the section being hidden, that field stayed populated, hidden or not. Because this information was being sent to a database in addition to being published on SharePoint, I needed to clear the option buttons on the sections being hidden.
Here is the scenario:
OptionButton1 - Yes = True, No = False, No value is set as a default selection
OptionButton2 - Yes = True, No = False, No value is set as a default selection
However, OptionButton2 should be NULL if OptionButton1 is set to False (No)
So I created a rule to change the value of OptionButton2 based on a False value for OptionButton1.
OptionButton Properties --> Rules --> Add
Condition - OptionButton1 = False
Action - Set a Field's value
Field - OptionButton2
Value - ?????Here is where I hit the snag. The value choices for OptionButton2 only had the following: (blank), TRUE, FALSE, 1 or 0. Choosing (blank) did not work and I didn't want the other options, since I wanted no value whatsoever.
It was a puzzle. The fix? Leaving the "Value" field completely blank. Obvious, you say? Well, it wasn't to me. But it worked like a charm!
Thank you for that helpful article! Greets from Germany
ReplyDeleteSven