Copy link to clipboard
Copied
In a dialog box script, is it possible to get the feedback of 2 values in a same function?
Such as below, I only get the "resp" answer. I did several tests without any success...
Doing it with 2 functions is working fine, but I'm pretty sur it is possible with a single function.
Thanks
myQuestion: function (results) {
for (var i=0; i<=2; i++) {
if (results["Rad"+i]) {
switch (i) {
case 0:
var resp=1;
var otherResp=4;
break;
case 1:
var resp=2;
var otherResp=5;
break;
case 2:
var resp=3;
var otherResp=6;
}
}
};
return resp;
},
You can return an array that contains both values, like this:
return [resp, otherResp];
You can put the values in an array and return the array.
Copy link to clipboard
Copied
You can return an array that contains both values, like this:
return [resp, otherResp];
Copy link to clipboard
Copied
Thank you, that's what I'm just thinking...
Copy link to clipboard
Copied
You can put the values in an array and return the array.