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 do I use the <param> tag?

Answers to common Plum DEV questions

Moderators: admin, support

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

using <param> to pass a value to a subdialog

Post by support »

When using <param> to pass a value to a subdialog, you must redeclare the variable name in the subdialog script you are using. Example:

Calling Page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <var name="local_parm1" expr="'A B C D'"/>
  <var name="local_parm2" expr="'1 2 3 4'"/>
  <form>
    <subdialog src="subdialog.vxml">
      <param name="parm1" expr="local_parm1"/>
      <param name="parm2" expr="local_parm2"/>
    </subdialog>
  </form>
</vxml>


Subdialog Page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form id="subdialog1">
    <var name="parm1"/>
    <var name="parm2"/>
    <block>
      parm 1 is <value expr="parm1"/>.
      parm 2 is <value expr="parm2"/>
      <return/>
    </block>
  </form>
</vxml>


Notice that in the subdialog page it is we redeclare the variables parm1 and parm2. Using undeclared variables in vxml throw an error.semantic event.

Locked