If OBA.value=true and OBB.value=true then
....
YOur way is correct as long as you list all ways. there should be (4/(4-2)!/2!)=4x3/2=6 ways.

ab ac ad
bc bd
cd