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 access the shadow variables in an input item?

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:

How do I access the shadow variables in an input item?

Post by support »

Input items (<field> tags, <record> tags, etc.) have an associated set of shadow variables which are used to return results from the execution of the input item (other than the value stored under the input item's name attribute).

A shadow variable is referenced as name$.shadowvar where name is the value of the input item’s name attribute, and shadowvar is the name of a specific shadow variable. E.g. the <record> element's "duration" variable can be accessed thusly:

Code: Select all

<form id="shadowvar_test">
  <record name="foo" beep="true">
    <prompt>
      Please record a message after the tone.
    </prompt>
    <filled>
     <if cond="foo$.duration > 10000">
       Wow, long message!
     </if>
    </filled>
  </record>
</form>

Locked