How about …
Alternative 1 Gaby’s suggestion
Alternative 2 Six conditional workflow actions to set a size in a custom state.
Alternative 3 Start with a list of sizes, then use the max of the values as an index to the list.
Bubble won’t let you do any more numerical operations past the first number parameter of
list#item, so the max value would need to be stored elsewhere first, for example in a custom state that is updated on either of the dropdowns changing value.
Then the problem becomes: how to generate a list of sizes.
This could be a database table - appropriate if they can be changed at times.
Or it could be a text list in a custom state, converted to a list with
:extract with Regex .
You can probably see this working, but getting messy for such a small list.
Alternative 4 Using the Expression element in the Toolbox:
["XS","S","M","L","XL","XXL"][dropdown 1's value <max>dropdown 2's value - 1]
Then you can refer to the Expression’s value for the size “S”.
If you go for this option, there’s an enhancement to cope with empty selections if you need it.