Prevent Users Making Multiple Submissions From Custom Pages

This is one of those things that is so simple and basic BUT if overlooked it can create a lot of mess, frustration and confusion. Depending on what your custom page is designed to do, you likely have a submit button on it. If your button is then using a Patch statement to update existing or create new records, clicking the button multiple times will fire that statement each time. Ugh! That could be ugly! In this post a very quick change to some of your formulas will help prevent that. Let’s take a look at how to prevent users from making multiple submissions from custom pages.

The first place you want to add some logic is on your OnStart formula at the App level. We are going to create a variable named button and set the value as false.

Set(varButton,false)
Click to view in detail

Then on the button where you have your Patch statement, we will add in the opposite to set the button variable to True. So when the app is opened, the varButton value is false, then when the submit button is pressed, the varButton value is true.

Set(varButton,true);
Click to view in detail

Now we can use that variable to determine if the button should be editable (can be clicked) or disabled (locked and greyed out and cannot be clicked). For this, go to the DisplayMode of the same button where you just added the line to set varButton to true. This states that if the varButton value is true, the button is disabled, otherwise it is in edit mode and can be pressed.

If(varButton =true,
DisplayMode.Disabled,
DisplayMode.Edit)
Click to view in detail

Now when a user is interacting with the custom page and presses the submit button, it will be locked and cannot be pressed again. Depending on what the Patch is doing, or the speed of someone’s internet access, it can take a moment before the custom page closes. This way the user knows something is happening and cannot just keep pressing the Submit button. Happy days!

Click to view in detail

Original Post http://meganvwalker.com/making-multiple-submissions-from-custom-pages/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
November 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
« Oct   Dec »
Follow
Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...