Hi there,
I have an App used by lots of users, and on one of the screens, I have a button which basically uses Flow to attach data to the user profile on click of the button.
Problem I am having is, some users are hitting the button twice, sometimes more and its running the flow and duplicating the info.
I would like a simple way of disabling the button once its clicked so avoid duplication.
Initially I applied the following,
On the button OnSelect I have Set(varButtonPressed, true)
And then in the DisplayMode property code is If(varButtonPressed,DisplayMode.Disabled, DisplayMode.Edit)
This works, but of course only the one time, and as many users use the App, I need it to be available for anyone who hasnt already pressed the button.
Any ideas how I can achieve this?
Thanks
This would be in the same place you are currently running the flow from, which I guessing will be an OnSelect for a button. And any code (like Navigate) after the Set() would happen after the flow is complete.
Thanks,
So I would apply this to OnSelect of the button? And if I say have Navigation after this, would it wait while the Flow is complete to Navigate? Thanks
If you set a variable to the value of the flow run, the app waits for the flow to complete before giving control back to the user, something like:
Set(varFlowResult, MyFlow.Run() );
Hello @JimboSey ,
One way I achieved something similar was by storing the variable as a record in a SharePoint list.
When the flow starts, it checks if the record is equal to "start" or something.
If it was different than "start", the flow updated the record to "start" then continued to process its things. Until the end, where the record was updated to "not started".
If it was equal to "start", it meant the flow was already started by someone else and it must not continue.
Hope this was helpful to you.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2