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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,175)