web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Start/Terminate flow i...
Power Automate
Answered

Start/Terminate flow if Ok/Cancel button is clicked on

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Can't seem to figure out what should be a simple task: I have a flow that begins with a pop-up box asking the user to select an item from a drop-down menu. Once they select an item, the flow kicks off executing the sub-flows related to whichever item the user selected. Within the initial pop-up box, there is an Ok button and a Cancel button.

 

How do get the flow to start after the user has selected an item AND clicked the Ok button?

 

How do terminate the flow if the user has clicked on the Cancel button?

 

Thank you!

I have the same question (0)
  • Verified answer
    tkuehara Profile Picture
    667 on at

    Hi @Anonymous 

     

    You could set your flow as follows:

    tkuehara_0-1626833945497.png

    The "Set variable" action will be set with a standard value (for example, "Select option"):

    tkuehara_1-1626834022191.png

    The loop while will keep reopening the popup until one of the conditions below happens:

    • User has selected a value from the dropdown and clicked the OK button
    • User clicked the Cancel button

    If user clicks "Cancel", it will set the variable %ButtonPressed% to Cancel; then I used the "Stop flow" action:

    tkuehara_2-1626834510790.png

    If user selects an option AND clicks "OK", the flow will go on to the next steps outside the loop.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This worked! Thank you for your assistance! I sincerely appreciate you taking the time to assist me. 😁

  • tkuehara Profile Picture
    667 on at

    Glad to help! Please accept as solution. 😊

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 269 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 184 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard