4 Replies Latest reply: Mar 5, 2012 11:33 AM by Eogan RSS

    Defaulting an option in an option feature

    899429
      Hi,

      I have an option feature with few options and I would like to default one of them on configuration invocation? Is this possible without using CX?
        • 1. Re: Defaulting an option in an option feature
          Sandeep Gandhi, Consultant
          Have you considered writing a defaulting rule along the following lines...
          "Always True" Defaults "Your option"

          See defaulting rule section at
          http://docs.oracle.com/cd/E18727_01/doc.121/e14324/T459750g1006673.htm#BHACACGI

          Remember, defaulting rules come with some negative impact on performance.

          Sandeep Gandhi
          • 2. Re: Defaulting an option in an option feature
            Eogan
            Biju --

            A little clarification on what Sandeep posted, in case it's not obvious to you.... When he mentions "Always True", this is a special modeling construct which provides a node which is always guaranteed to have a true value. It is implemented by creating an Option Feature, usually named "Always True Feature", with a Min/Max of 1/1, and within it a single Option, usually named "Always True". A sole Option in a required Option Feature will always automatically get selected upon initialization, so you have an Option that is always true that can be used in rules requiring a condition that is always true.

            The above solution is fine for defaulting values in non-BOM Models, but for BOM Models I prefer to use the root of the BOM Model on the left side of the rule, as it eliminates the overhead of the additional structure. It will also behave properly when your Model is referenced from a parent BOM Model, which may not be the case with other approaches.

            Alternately, you could create a Statement Rule with the syntax: True Defaults 'My Option'

            Hope this helps.

            Eogan
            • 3. Re: Defaulting an option in an option feature
              899429
              Thanks Sandeep/Eogan for the replies.
              I tried the solution, but the issue is that the options always default whenever some action is done to the configuration. I want them to default only during the initial invocation/initialisation of the configuration. Is there a simpler way to incorporate this into the defaults rule?
              • 4. Re: Defaulting an option in an option feature
                Eogan
                Biju --

                All of the solutions Sandeep and I have mentioned should take effect immediatley upon Configurator initialization. Can you please provide some more detail around exactly what you're trying to do, and exactly what behavior you're seeing instead?

                Eogan