Hello
I am trying to have conditional logic within a catch block - depending on whether values are set I want to fork the decision - however this doesn't seem to work.
Suggestions?
<field name="thisfield">
<catch event="connection.disconnect.hangup">
<var name="var1"/>
<if cond="typeof thisfield$ !='undefined'">
<assign name="var1" expr="'choice 1'"/>
<else/>
<assign name="var1" expr="'choice 2'"/>
</if>
<submit namelist="var1" .............. />
</catch>
</field>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
if condition within catch block
Re: if condition within catch block
Hi,
You can certainly implement conditional logic within a catch block in your VXML code. The only issue we noticed with the code snippet you posted was that you must surround your <field> with a <form> such as:
Hope this helps!
Regards,
Plum Support
You can certainly implement conditional logic within a catch block in your VXML code. The only issue we noticed with the code snippet you posted was that you must surround your <field> with a <form> such as:
Code: Select all
<form>
<field name="thisfield">
<catch event="connection.disconnect.hangup">
<var name="var1"/>
<if cond="typeof thisfield$ !='undefined'">
<assign name="var1" expr="'choice 1'"/>
<else/>
<assign name="var1" expr="'choice 2'"/>
</if>
<submit namelist="var1" .............. />
</catch>
</field>
</form>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: if condition within catch block
AArrgh.
I will retry. Just noticed in Log that the values I am looking for ARE being set - I just omitted them from the submit namelist!
THanks for the prompt response.
s
I will retry. Just noticed in Log that the values I am looking for ARE being set - I just omitted them from the submit namelist!
THanks for the prompt response.
s