|
$next_box [IIF] |
![]() ![]()
|
Set Next Infobox or State to Transfer to
$next_box infobox|Sstatenum|S:state|@varname
This command is used to control the progress of a transaction. After processing the current infobox, often a $type question infobox or a $type decision infobox, the parameter from this command is used to specify the next action, which may involve transfer either to an infobox or to a new processing state.
The parameter on this command is used as follows:
| infobox | the name or number of an infobox (names should not start with an 'S' and numeric digits, which would be interpreted as a state). |
| statenum | the number of a suitable state as shown in Appendix C: State Table. Use this option with caution. |
| state | the name of a suitable state as shown in Appendix B: State Table. Use this option with caution. |
| varname | the name of a variable whose contents contain an infobox name or number. |
When the $next_box command is given in a $type menu IIF, it specifies the processing when the "zero" menu option is selected. The $next_box command is ignored if the caller selects an option other than zero. This command replaces the obsolete $menu_exit command which can only select a state.
Default: during fax-on-demand, return to state 6 (play standard voice prompt 4, more images prompt) if not specified. Otherwise, this command or $chain is a required command to define the continuation of processing in a sequence of infoboxes.
Examples:
$next_box 123 ; go to box 123
$next_box @val ; go to the box contained in variable VAL
$next_box s157 ; say good_bye and hang up
$next_box s:good_bye ; say good_bye and hang up
If you have a programming background, it is tempting to assume that $next_box is equivalent to GOTO. It is not. In the following example, infobox 1 will never be selected, because the current infobox is processed in its entirety before the next box is selected, and the second command will always override the first:
$if @response = 1 ; ! incorrect example
$next_box 1 ; ineffective
$endif
$next_box 9 ; always selected
The correct way to code the above example is:
$if @response = 1
$next_box 1
$else
$next_box 9
$endif
Topic url: http://www.copia.com/support/refmanual/index.html?%24next_box.htm