Page 1 of 1

received event: error.semantic.ecmascript

Posted: Wed Jun 17, 2015 12:55 pm
by vikas
Is there any constraint on the value that can be assigned to block name?
I got "error.semantic.ecmascript" when assigning "Register_Card-Failed_On_First_Name_Entry" to block's name.

I have provided relevant sections of code & error log below.
Please let me know the limitations to setting block name. Thanks.


Code:

<form id="Report_Transfer_Reason">
<block>
<log expr="'*****In Report_Transfer_Reason (MainForm.xml) *****'"/>
<assign name="Analytic_flag" expr="true" />
</block>
<block name="Register_Card-Failed_On_First_Name_Entry" cond="transferReasonCode == '23'">
<goto next="#end"/>
</block>


Error::

LOCAL: *****In Report_Transfer_Reason (MainForm.xml) *****
VXI::assign_element(name="Analytic_flag" expr = "true")
Entering form = 'Report_Transfer_Reason' form item = 'Register_Card-Failed_On_First_Name_Entry'
invalid assignment left-hand side line 1
SyntaxError: invalid assignment left-hand side line 1
received event: error.semantic.ecmascript:
VXI::var_element(name="subject" expr = "environmentType + ' IVR Error in ' + I

Re: received event: error.semantic.ecmascript

Posted: Wed Jun 17, 2015 2:25 pm
by support
Hi Vikas,

The reason why you experienced this error is related to the "-" used within the block name "Register_Card-Failed_On_First_Name_Entry". All name attributes in VXML are Javascript variables as well. This is what allows you to perform Javascript on the resulting data for certain tags. The "-" is a reserved character within Javascript for subtraction. If you swap the "-" with an underscore, you shouldn't have any further problems.

Regards,
Plum Support