I have a TEXT field with a calculated value: The value is based on the selected value of a SELECT_ONE field named “structure_type”. The calculation is essentially serial string of if statements checking the selected value of “structure_type” and calculating the value of the TEXT field to some value.
if(selected(${structure_type}, "B-85"), "34 ft 7 in", "") or if(selected(${structure_type}, "B-85OP"), "34 ft 7 in", "") or if(selected(${structure_type}, "B-90"), "34 ft 7 in", "") or ...
In a device Survey123 the TEXT field is correctly calculated:

In the web Survey123, the TEXT field is incorrectly calculated:

Note that the web Survey123 treats the calculation as a Boolean, whereas the device Survey123 performs the desired calculation.
My question is: How can I perform the calculation correctly on both the device and the web?
TIA