read a list of elements and foreach to do save, do delete ..
Posted: Thu Mar 05, 2009 4:39 am
I am having some difficulties when I try to read a list of elements and for each element to do save, or delete (customer's choice) and move to the next element in the list.
I am having some difficulties when I try to read a list of elements that comes from the application and depends on the logged user.
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0">
<form >
<script src="http://www.bissoft.ro/HomeHealth/WebIVR/IVR.js" maxage="5000" maxstale="5000"/>
<block>
<var name="report"/>
<prompt>"Please report the status of the following items"</prompt>
</block>
<block>
<prompt> <break time="500ms"/>
<foreach item="i" array="ItemReports()">
value <value expr="i"/> <break/>
<assign name="report" expr="i" />
<goto next="#item"/>
</foreach>
</prompt>
<goto next="#item"/>
</block>
</form>
<form id="allDone">
<block><prompt>There is nothing left to do.</prompt><disconnect/></block>
</form>
<menu id="item">
<prompt>
Press 1 if complete
Press 2 if refused
Press 3 if patient not able
Press 4 if already done
Press 5 if not applicable
Press 6 if admin change
</prompt>
<choice dtmf="1" next="#itemComplete">
complete</choice>
<choice dtmf="2" next="#itemRefused">
refused</choice>
<choice dtmf="3" next="#itemPatientNotAble">
patient not able</choice>
<choice dtmf="4" next="#itemDone">
already done</choice>
<choice dtmf="5" next="#itemNotAplicable">
not applicable</choice>
<choice dtmf="6" next="#itemAdminChange">
admin change</choice>
</menu>
<form id="itemComplete">
<var name="method" expr="'itemComplete'" />
<block>
<goto next="#status"/>
</block>
<block>
<submit namelist="method report" next="http://www.bissoft.ro/HomeHealth/WebIVR/PlumIVR.aspx"/>
</block>
</form>
I am having some difficulties when I try to read a list of elements that comes from the application and depends on the logged user.
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0">
<form >
<script src="http://www.bissoft.ro/HomeHealth/WebIVR/IVR.js" maxage="5000" maxstale="5000"/>
<block>
<var name="report"/>
<prompt>"Please report the status of the following items"</prompt>
</block>
<block>
<prompt> <break time="500ms"/>
<foreach item="i" array="ItemReports()">
value <value expr="i"/> <break/>
<assign name="report" expr="i" />
<goto next="#item"/>
</foreach>
</prompt>
<goto next="#item"/>
</block>
</form>
<form id="allDone">
<block><prompt>There is nothing left to do.</prompt><disconnect/></block>
</form>
<menu id="item">
<prompt>
Press 1 if complete
Press 2 if refused
Press 3 if patient not able
Press 4 if already done
Press 5 if not applicable
Press 6 if admin change
</prompt>
<choice dtmf="1" next="#itemComplete">
complete</choice>
<choice dtmf="2" next="#itemRefused">
refused</choice>
<choice dtmf="3" next="#itemPatientNotAble">
patient not able</choice>
<choice dtmf="4" next="#itemDone">
already done</choice>
<choice dtmf="5" next="#itemNotAplicable">
not applicable</choice>
<choice dtmf="6" next="#itemAdminChange">
admin change</choice>
</menu>
<form id="itemComplete">
<var name="method" expr="'itemComplete'" />
<block>
<goto next="#status"/>
</block>
<block>
<submit namelist="method report" next="http://www.bissoft.ro/HomeHealth/WebIVR/PlumIVR.aspx"/>
</block>
</form>