dynamic "goto"
Can a variable be used on a goto/label, the aim being to use dynamic labels instead of static ones?
We have unsuccessfully tried:
Label &[myLabel]
Goto &[myLabel]

dynamic "goto" is possible in GuiXT scripts and in InputScripts. Example:

goto  "X&F[Company code]"
Return "E: Company code &F[Company code] invalid" -statusline

label X
Return "E: Please specify the company code" -statusline

label  X0001
Set V[ctext]  "Toronto"
Return

label  X0002
Set V[ctext]  "Miami"
Return

label  X0003
Set V[ctext]  "Seattle"
Return

Scripts can become difficult to understand when you use dynamic gotos. And when you use field values as above, unexpected things can happen if the user enters values that equal other labels in the script.

Dynamic labels can be used in GuiXT scripts, but not in InputScripts. And even in GuiXTscripts I would suggest you avoid them, since keeping track of the control flow can get very complicated. For example, the following script 

Set V[x] End
goto L3

label &V[x]
Message "X"
Stop

label L3
Set V[x] "L2"
goto End

label End
message "End"

displays "X" and not "End" .