Skip to main content
Participant
Dec 13, 2017 12:13 AM UTC
Question

Syntaxerror

This is probably way simple but....

I have this script:

var a = this.getField(2 PCT);

var b = this.getField(SUB TOTAL);

event.value = a.value * (b.value / 100)

And get: SyntaxError: missing ) after argument list 1: at line 2

Can someone explain this to me?

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Joel Geraci
Community Expert
Community Expert
Dec 13, 2017 12:48 AM UTC

You need to put quotes around the field names.

var a = this.getField("2 PCT");

var b = this.getField("SUB TOTAL");

event.value = a.value * (b.value / 100)

You might want to run through some of the content here...

JavaScript Tutorial​

Translate