I'd guess that there are multiple copies of the script running. Either that or the file has corruption (not likely).
Lastly, are they any script triggers attached to the layout, or to the portal objects? Use the script debugger to see what's happening.
BTW rather than use the Clear step, use Set Field. The Clear, Cut, Copy and Paste script steps rquire the fields to be on the current layout. Set Field does not have that requirement.
I am woking on FMPro 11 (not advanced). Window platform.
There was an OnLayoutEnter script running, but I realized I didn't need it anyways so I deleted it. But the dialog box still showed up twice.
What did the onLayoutEnter script do?
Make a new script with just the dialog and If statements, put a button on on the layout (not portal) to run this new script and report back.