- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
in script objects you only can use JavaScript syntax, FormCalc in not supported by these objects at all.
As you also cannot call an JavaScript action from a FormCalc event.
You'll have to use JavaScript in all scenarios you're using the script objects.
Here's a sample how to do this.
Create a function in your script object, that contains some nested arrays.
Each array contains two values, the first represents the name the second the value.
Through the forEach method you can simply filter the arrays.
function loadValue (vValue){
var aVars = [
["varA", "Lorem"],
["varB", "Ipsum"],
["varC", "Dolor"]
],
vReturn;
aVars.forEach(function (element, index) {
if (element[0] == vValue) {
vReturn = element[1];
}
});
return vReturn;
}
Retrieve the value from array "varA" use this function.
Owners.loadValue ("varA");
Views
Replies
Total Likes