If the JavaScript code needs to return a value, for example, when calculating a field's value on the fly or setting the loop conditions, simply assign something to the value
variable in the last line of the script.
For example:
// a bunch of code
value = 1 + 2 + 3;
Technically speaking, you don't even have to use the value
variable. The last calculated expression will be used as a return value.
For example:
{firstName} + ' ' + {lastName};
Comments
0 comments
Please sign in to leave a comment.