GuiXT script you can use:
make sure you have an appropriate if...endif around the Enter statement,
otherwise an infinite loop is started if the InputScript stays on this screen. You
first time during this transaction?
Set V[prev_transactionid] "&V[_transactionid]"
similar mechanism, using a V-variable that you set in the InputScript.
infinite loop does occur during testing (flickering screen), press the
"Visible" button in GuiXT window and change the script.