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

foreach not providing ECMA variable?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

foreach not providing ECMA variable?

Post by moshe »

I've got a nodeList I extract from a data element.

I'd like to print out the data elements, but when I attempt to do so, the foreach executes but the ECMAscript compiler complains:

Code: Select all

<foreach array="nodeList" item="foo">
 <log expr="':::::::LOG::::::::' + foo"/>
</foreach>
As far as I can tell, foreach ought to fail outright, or the items in nodeList ought to be printed in some for or another. What I get instead is

Code: Select all

VXI::foreach_element()
:::::::LOG::::::::
VXI::queue_prompts()
errmsg ReferenceError: foo is not defined line 1 linetxt tokentxt 

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post by moshe »

After further debugging -- my system was actually complaining about a different foo -- I see that variables are possbily being created but are being ignored if so. toString() doesn't help.

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

IVR application script needed to better understand issue

Post by support »

Hi,

Can you post the IVR application script that's causing this to happen? We need more information to help you with this IVR problem.

Regards,
Plum Support

Post Reply