cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndMau
Regular Visitor

Sometimes submit button launch 2 times the flow

Hi, this is my first post.

I have an Expenses Report Apps that works with lists and an approval flow. There are about 20-30 requests per month, but it happens that some of them (2-3) are strangely duplicated at the flow level, after the submit. Approvers then receive 2 times the same request why?

AndMau_0-1655125316016.png

In the picture you can se that the 2 flows run at different times (in this case after 20 seconds).

these are the properties of the submit button in PowerApps:

AndMau_1-1655125720342.png

AutoDisableSelect is true. 
ApproveExpense.Run(SelectedReport.ID) lounch the Flow

AndMau_2-1655126039888.png

 

Please help me!

4 REPLIES 4
Drrickryp
Super User
Super User

@AndMau 

The submit button should only have SubmitForm(...,

The rest should be in the OnSuccess property of the form.

Thank you, Drrickryp,
I made your change, and the apps works well, but we have to wait next month to see eventually duplicates.

Drrickryp
Super User
Super User

@AndMau 

The reason you had an intermittent problem is that sometimes PowerApps will execute commands in parallel rather than in series, particularly if one like SubmitForm() takes longer than the others.  Besides, you only want the other commands to execute if the form is successfully submitted. 

AndMau
Regular Visitor

@Drrickryp ,
18 new requests was submitted, 2 of them started 2 times the approvals flow..
For example this:

AndMau_2-1656583978786.png


I've made your suggested change:

AndMau_0-1656583768587.png

AndMau_1-1656583872180.png

But the problem remain.

Can you (anyone) help me?



Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,617)