We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

received event: error.semantic.ecmascript

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
vikas
Posts: 53
Joined: Wed May 13, 2015 7:46 pm

received event: error.semantic.ecmascript

Post 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

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: received event: error.semantic.ecmascript

Post 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

Post Reply