You need to add another few steps. You must capture the option the user clicked on. So it would look like this:
If ( Get ( FoundCount ) = 0 )
Show Custom Dialogue ( "Alert" ; "Do you want to go HERE or THERE?" )
If ( Get ( LastMessageChoice ) = 1 )
Go to Layout 'HERE'
Go to Layout 'THERE'
Given that the OP DOES use Get ( LastMessageChoice ) = 1, some other factor is interfering that we can't see from what is posted so far.
Either the desired layout is not the "original layout" or a script trigger on the layout (on layout enter or On Record Load) is interfering with your results are two possibilities that I can imagine.
If you have advanced, you might want to run this script with the debugger enabled as that makes it easier to see what might be going wrong with your script.
I was, eh... reading some other post entirely at the time.
There are trigger scripts on entering that layout and trigger scrips on entering the other layouts. That seemed to be the issue. I adjusted the script by adding HALT SCRIPT. Do you see and disadvantage to using this command?
Does that work for you?
You took out a go to layout step and that's what is keeping the trigger from being tripped. If that does the job great, but you can probably remove the halt script step.
The Halt Script won't do anything in this context unless there is another script on the call stack (a script was paused before this one was executed or another script used Perform script to perform this script...) In those cases, it will terminate those scripts as well as the above script. (Which was going to terminate anyway.)
There are two ways I use to keep layout based triggers from being tripped in scripts like these.
1) Make a duplicate layout and remove all triggers from the duplicate layout. Specify this layout in Go to Layout. This method is useful when your script goes to a layout, does some stuff and then switches back. It's not a good option when you need your script to go to a layout and stay there for the user to interact with.
2) Put the trigger controlled script inside an If block that tests a global variable:
If [Not $$TriggersOff]
#Put script steps here
Then use these steps in scripts that would otherwise trip the script trigger:
Set variable [$$TriggersOff ; value: True ]
Go To Layout [....
Set variable [$$TriggersOff; value: false ]
That method temporarily disables the triggered scripts.