My situation is that I need to get a single value that defines the combination of multiple selection options. Here is a small example of what I'm looking to do.
A user is buying a shirt. There are many different options the user can select when buying the shirt. Only one option can (and must) be selected from each selection group. The selection groups could be represented as a Radio Button List or Dropdown List, anythign that only allows one selection for each group. For example:
Shirt Color: Red, Blue, Green, Black, White, or Yellow
Shirt Size: X-Small, Small, Medium, Large, X-Large, XX-Large
Shirt Design: Horizontal Striped, Vertical Stripes, Polka Dots, Diagonal Stripes, No Design
Shirt Type: Button Up Shirt, Polo Shirt, T-Shirt, Long Sleeve T-Shirt, Sweatshirt
So only one option can be selected from each group for the sake of this problem. I get a total of 900 different variations (6x6x5x5) using the possible selections. Given that the following options have the following values:
Red = 1, Blue = 2, Green = 3, Black = 4, White = 5, Yellow = 6
X-Small = 0, Small = 1, Medium = 2, Large = 3, X-Large = 4, XX-Large = 5
Horizontal Striped = 0, Vertical Stripes = 1, Polka Dots = 2, Diagonal Stripes = 3, No Design = 4
Button Up Shirt = 0, Polo Shirt = 1, T-Shirt = 2, Long Sleeve T-Shirt = 3, Sweatshirt = 4
and that a selection of {Red, X-Small, Horizontal Striped, Button Up Shirt} = 1 and {Blue, X-Small, Horizontal Striped, Button Up Shirt} = 2, etc,
What is the correct way to find the value based on the selections made? For example what should the selection value of {Black, Large, Horizontal Striped, T-Shirt} be and how do you come to the solution? I can't quite put my finger on it and everything I've tried seems to have been unsuccessful. It's probably a simple solution and I'm just brain dead right now.