cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

Anyone have a way to execute 2 (or more) Flows sequentially from a single PowerApps button and other squirrelly PowerApps Editor behavior.

The PowerApps editor for executing (Run) flows from an OnSelect property of a PowerApps button is very squirrely.  If I have text in the field before I choose Action-->PowerAutomate-->Select a Flow, it completely blows the text away (e.g. if I want to output of a Flow to populate a collection as would happen on a SQL call).  I find myself having to cut and paste the "pre" and "post" text in repeatedly.  Is this really the way this is supposed to work?

 

This leads to the crux of this post.  I would like to have a single Button press trigger the calling/execution of two (or more) separate Flows sequentially (or in parallel, if possible).  Given the current behavior of the PowerApps editor, this is impossible as the addition of the second Flow blows away the first Flow call.  I am coming to the conclusion that while you can easily execute multiple steps in an OnSelect property with the use of the ";", adding a 2nd or 3rd Flow is not possible.  Is this right?  Am I missing something?

using

And assuming I am right about this not being supported, does anyone have a solution like having the OnSelect button "Press the Button" of another Button.  Then I could put the second Flow call in a second invisible Button and have it called by the first one.  

 

Thoughts or experience with this problem.  Can't find anything really close.  There is one post about using a button to call one or the other Flow but nothing where I want both Flows to be executed.  I am trying to figure out how to adapt the post to my situation but not seeing that clearly.

 

Thanks,

Mark

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi @markslosberg,

 

I totally agree it is little annoying triggering flow in PowerApps, Yes as you rightly said it will clear out the test existed previously when you click on flow to add onSelect of the button property. I strongly believe product team is working on that
Work around:
copy and paste all the code as part of OnSelect to a notepad  and then add the flow and replace the text / formulas back to onSelect property. or other best way is start typing in the flow name and PowerApp will show you the flow name right below (as part of intelligence) and then say <<flowname>>.Run();

coming to adding/running more than one flow we can 100% do it with the above workaround start type-in the flow1name.Run(); 
flow2name.Run(); 
if you want to run the same flows parallel? just rap the same code as 

Concurrent(
SendMessage.Run(),
SendEmail.Run())

 see the working model below:
RunFlows.gif

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

2 REPLIES 2
Super User II
Super User II

Hi @markslosberg,

 

I totally agree it is little annoying triggering flow in PowerApps, Yes as you rightly said it will clear out the test existed previously when you click on flow to add onSelect of the button property. I strongly believe product team is working on that
Work around:
copy and paste all the code as part of OnSelect to a notepad  and then add the flow and replace the text / formulas back to onSelect property. or other best way is start typing in the flow name and PowerApp will show you the flow name right below (as part of intelligence) and then say <<flowname>>.Run();

coming to adding/running more than one flow we can 100% do it with the above workaround start type-in the flow1name.Run(); 
flow2name.Run(); 
if you want to run the same flows parallel? just rap the same code as 

Concurrent(
SendMessage.Run(),
SendEmail.Run())

 see the working model below:
RunFlows.gif

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Thanks. I did figure out how to call a button using the Select(button) command which was my first successful workaround as I created a hidden button with the 2nd Flow call.
 
I will give this method a try. I like it.

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,759)