Input esterno avviamento secondo programma

hi,
i have a problem with an external input. The input is a button and when i press this the robot have to do a program different of the principal program.

the program is:

Thread 1

If digital input DI0 = True

MoveL

Direction: Base Z-
Until - Distance: 100 mm
MoveL
Waypoint 1
Halt

I don’t now why the robot reach the waypoint 1 whitout doing the Direction.