cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SMadden
Level 6

Advanced Suite / Mutually exclusive FeatureTree possible?

Hi,

We have a Suite project with several different features. Some of them depend on each other, others are mutually exclusive. We use the default InstallationFeatures Dialog with the FeatureSelectionTree Control.

I'm able to select a feature dependency by adding a new Set Property event with appropriate condition under Events / Item changed of the FeatureTree control. So far so good. What I struggle with are the mutually exclusive features and when the Suite is run in maintenance mode.

Regarding the first problem. Lets say Feature1 is already checked and the user tries to check Feature2. Both features are mutually exclusive. What I can do is this so that Feature1 gets unchecked:














But it only works in this exact order. If Feature2 is checked first and the user tries to check Feature1 afterwards, it automatically gets unchecked again the moment the checkbox is checked. I understand why, but I don't know how to get around it. Does anyone have an idea if this is possible?

Regarding the maintenance mode / modify scenario. How would I know if an actionState would have to be set to Remove instead of just being cleared if two mutually exclusive features are selected?

Thanks,
Sandra
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

For the first part, it sounds like you need to add a property that tracks which feature was already selected. For example, when neither is selected, it could be empty. When one is selected, it could be set to the name of that feature. When both are selected, it could use the value of that property to decide which feature to reset.

For the second part, you can reference the FEATURE[name].installState pseudo property. While you could make the conditions really crazy and handle this without extra properties, I think it would be much more understandable to use it once to set up two properties that reflect the desired actionState when they need to be cleared. Then just use those properties as the value for the SetProperty actions. That should mix well with the needs for the first part.
0 Kudos
SMadden
Level 6

awesome, thanks so much for your help Michael. I got it to work by adding the extra state variable, the installState check and duplicating the whole section. One sets the actionState to empty, the other one to remove depending on the installState. This is the code snippet in case someone is interested.























...



-Sandra
0 Kudos