Choosing Between Two Options Based on a User Response
Frequently, a user’s response is used to select one of the two available options. For example, you may want to select the standard-duty battery or the extended-duty battery for a particular product.
To choose between two options based on a user response:
1. Create a configurable module.
2. Attach two child parts, one for each package option.
3. Add a boolean input parameter to the configurable module, for example, askExtendedDuty.
Define an appropriate prompt value for this parameter, such as: Do you want an extended duty battery?
4. Add this boolean parameter to the Inclusion Option of the configurable module for the child part that corresponds to the extended duty battery.
5. Add a second boolean non-input parameter, such as useStandardDuty, to the configurable module.
Define the default expression for this parameter as !askExtendedDuty
6. Add the second boolean parameter useStandardDuty to the Inclusion Option of this configurable module for the child part that corresponds to the standard duty battery.
Using this approach, the user is presented with a single question to determine whether they want the extended duty battery or not. The user’s response is automatically used to include or not include the extended duty battery and the opposite of the user’s response is used to exclude or not exclude the standard duty battery.