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

How to transfer data element results via submit?

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:

How to transfer data element results via submit?

Post by moshe »

I have gathered information via a data element, and I'd like to transfer the information gathered by that element via submit.

Code: Select all

<data src="foo.xml" name="info" method="post" namelist="request"/>
followed later by

Code: Select all

<submit expr="thatNextFile" namelist="info" method="post" />
does not work, as seen when I attempt to set info in the next script:

Code: Select all

<var name="info" expr="<?php echo $_REQUEST["info"]?>"/>
I get a null, which indicates not a PHP failure but a failure to set info in the POST in the first place. Encoding types, as well as method types, do not seem to matter.

I'm not particularly surprised that this does not work, but I'd like to know if it can be made to work. It's an implementation-dependant issue.

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

Transfer data element results via submit using IVR system

Post by support »

Hi,

It is not possible to submit the value of "info" in your IVR code example because it is not a simple type. The contents of "info" are a complex javascript object which has no simple representation when performing the POST.

Here is an IVR example of how you would transfer the data element results via <submit>:

Code: Select all

<data src="foo.xml" name="info"/> 
<var name="tmpvar" expr="info.documentElement.firstChild.toString()"/>
<submit next="newfile.php" namelist="tmpvar"/>
Hope this helps.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 4:20 pm, edited 4 times in total.

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

Post by moshe »

Thank you. Without JSON or similar technology, I can't encapsulate the object to pass along.

Instead, I'll either re-acquire the data or put into the root's scope; actually, I've already implemented the latter.

Post Reply