How to make Select (Single) value of type double


I’ve got Select (Single) on my Form having the following Items:
Text Value
“Option One” 1
“Option Two” 2
I associated a variable {{v}} with my Select value.

How can I get my variable of type “Double”???

What I tried is:

  1. Simply to enter {{v}} in the value field in Select properties.
    I get my value as string “1” or “2”. So I can’t use it directly in my sequence flow condition expression where I want to compare it with a number. It returns an error.
  2. I tried to initialize v as a variable of type double using the “Initialize variables” object.
    Then entered {{v}} in the value field in Select properties.
    Same story. Get string as an output.

3, Tried to use “Script” and convert one variable to another.
For that I initiated two variables:
vStr and v.
I used vStr in Select (Single) value field.

In my script I have:

var vStr = execution.getVariable(“vStr”);
var v = parseFloat(vStr);
execution.setVariable(“v”, v);

Seems parseFloat is not recognized and the line fails.

In my preview, I get this payload
“v”: “1” // the value is string

In Story Book examples here

they get
“select_1”: 2 // the value is numeric

But I can’t understand how they configured it this way.

Please help.

Kind regards,