Depending on the case i'd like to choose a random port between 2 numbers. But it is not working, it always choose the same port.
/**Custom Code*/
Object item = param(1);
Object current = ownerobject(c);
/***popup:ValuesByCase:valuestr=Port*/
/**Port By Case*/
Variant value = /***tag:ValueFunc*//**/item.persona/**/;
/***tagex:data*/
if (value == /**/1/**/) {
return /**/1/**/;
}
if (value == /**/2/**/) {
return /**/1/**/;
}
if (value == /**/3/**/) {
return /**/duniform(2,4)/**/;
}
if (value == /**/4/**/) {
return /**/duniform(5,6)/**/;
}
if (value == /**/5/**/) {
return /**/7/**/;
}
/***/
return /***tag:default*//**/1/**/;
What is wrong?