4 Replies Latest reply: Sep 6, 2012 3:19 AM by 899429 RSS

    Mutually Exclusing Options in an Option Feature


      I have a requirement to implement a mutually exclusing option feature - eg: There are 10 options in the option feature. The last one is 'None of the above'. In this case, when the user selects 'None of the above', all the other selected options need to be deselected and vice versa. I can create a Logic rule (excludes or negates) to implement this, but we do not want the rule violation message displayed. In this case, the only option is a CX rule I would guess. Has anyone implemented this type of requirement using CX? If so, could you provide guidance. Thanks in advance.
        • 1. Re: Mutually Exclusing Options in an Option Feature
          If you want to force the deselection of options that are already selected, then you will encounter a violation message. An alternative, is to display a message that would ask the user to remove the prior selections when the "None" option is selected. This could be achieved with a Resource and Numeric rule. Create the resource and add an Overconsumption message --- something like "Please remove all selections".

          Then create a numeric rule that sets the value of the resource to "-1" when the "NONE" option is selected and at least 1 of the other options is also selected.

          Another alternative is to break the "None" option out into a separate option feature. For example, suppose you currently have the following:

          Additional Options (Min: 1 / Max: null)
          --> Option 1
          --> Option 2
          --> Option 3
          --> None

          You could change to the following:

          Select Additional Options (Min: 1 / Max: 1)
          --> Yes
          --> No

          Additional Options (Min: 0 / Max: null) ('Select Additional Options'.'Yes' Implies this feature. Can also have a display condition to hide this in the UI until "Yes" is selected)
          --> Option 1
          --> Option 2
          --> Option 3

          I'm sure there might be a few other alternatives that come close to meeting your requirements....but there are probably none that exactly perform the way you expect.

          • 2. Re: Mutually Exclusing Options in an Option Feature
            Thanks Jason for that.
            Im trying to implement this using CX.
            I want to tie the CX to the parent option feature node and get the option that invoked the event. Is there a CIO method that I can use to get this value. I have checked the OptionFeature class, it has a getSelectedOptions method but not the one that is selected last (which is required to identify which is the CX firing option). Any ideas? Thanks.
            • 3. Re: Mutually Exclusing Options in an Option Feature
              Biju --

              The postValueChange Event has an Event Parameter called changedNode. If your CX is bound to the Option Feature and its scope is Base Node Subtree, passing the changedNode to your CX method will tell you which Option was selected (or deselected; your CX will have to account for deselection as a possible "ValueChange").

              • 4. Re: Mutually Exclusing Options in an Option Feature
                Thanks a lot Eogan for that. It worked fine.