Hi Experts. I'm stumped on this one. I currently need to build a tool that will evaluate the user's choices in a number of checkboxes. For this test, I will only use 8 choices. Based on the results of the individual choices, different suggested activity needs to be displayed. For instance, if the user chooses choice 1, and choice 5, the individual suggestions1 and suggestions5 need to be displayed. Also, if there is a grouped suggestion for the choice it needs to be displayed, therefore, if they choose choices 1 and 5, suggestions 1 and 5 need to display, along with the grouped suggestion for the combination of 1 and 5. I'm making that happen by taking the checkbox choice, multiplying it by -1 and then creating a boolean number. I then recursively step through the boolean number from right to left to check for the value of each place. If it's a 1, I push a tag to a field in a record in a table to indicate it should be displayed. The records in the table are named with a suffix equal to the factor they represent. I know I don't need to do that and I could just step through the controls, but I use the boolean number to also determine it's decimal equivalent. That decimal equivalent lets me know what options are chosen as a grouping, which I can then use to check for a corresponding grouped suggestion value. All this works. I can increase the number of checkboxes (choices) without impacting the code at all. I can therefore build a maintenance section for the user to add additional choices and additional suggestions for total groupings and for the individual choices. What I can't figure out right now (I many be staring right at it!) is how to capture the values for any of the potential sub-groupings so that I may also display those choices.
For instance, choices 1,2,3,4. Have a total grouping of the four choices. But there are also the sub-groupings 1 and 2, 1 and 3, 1 and 4, 1 and 2 and 3, 2 and 3 and 4, etc. It's these values that I also need to capture so that I may display suggested actions for those sub-groupings as well. Since the potentially chosen options are not necessarily sequential, I can't figure out a way to step through it and capture all the possible values.
If anyone has any ideas, I'd be thrilled to hear them.