October 12, 200619 yr I have a script activated by a button on FM that simply uses a web viewer to open an ASP script. When you double click this button instead of single click it the script actually runs twice and causes duplicates in our data. Is there a way to prevent a double click on a button within filemaker? any information would be greatly appreciated. thanks!
October 12, 200619 yr In your script, add a step that places the current date into a date field. Then, add an If statement that checks if the date field is empty in order to continue on with the web viewer display.
October 12, 200619 yr Author I went a slightly different route (still the same idea) and created a field called Auction_Post_Check and simply populate it with a 1 upon clicking the button. Then I added an If/Then around everything so that if it already has a 1 it won't activate the ASP script. Ran a test and it seems to have worked great. Thanks a lot!!!
October 13, 200619 yr Excellent! Glad to hear it works for you. The only reason I use a date field is so I can tell when the action took place. You could also use a Timestamp field.
October 14, 200619 yr Wouldn't defining the button as 'Current Script: Halt' do the job? Or, if it's essential not to abort the script already running, you could set the button to 'Current Script: Resume' and add a script parameter = Get (ScriptName). Then start the script with: If [isEmpty ( Get ( ScriptParameter ) ) ] ...
Create an account or sign in to comment