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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Conditional Cancel Dia...
Power Apps
Unanswered

Conditional Cancel Dialog Window.(Show cancel dialog window only when cancel button is clicked with changes made on screen)

(0) ShareShare
ReportReport
Posted on by 16

Hello Power Apps Community, 

 

So my power app includes a cancel screen that appears when you click the cancel button. It works fine right now but you get the cancel screen every time, even if you haven't made changes on the window. I would like to see if it's possible to have the cancel screen only come up when you make changes on the screen.

I was actually able to do this but I ran into an issue using the IF condition. Here's my canvas app formula:

 

If(
Gallery1Checkbox.Value = true Or Gallery2Checkbox.Value = true,
UpdateContext({showCancelDialog: true})
);
If(
Gallery1Checkbox.Value = false Or GalleryCheckbox.Value = false,
Navigate('Main Screen')
)

 

Brief explanation of the current screen, it includes two filtered galleries on the left and right connected to sql. Both galleries include check boxes with labels. When you check boxes on each gallery and save they move to the left or right corresponding to changes made in the database. 

 

What's causing the issue with my IF statement is on the left the checkboxes are always checked and on the right the checkboxes are always unchecked so my cancel screen goes all wonkey when you click the cancel button and there's checked values on Gallery1(on the left). 

I believe my solution might involve setting default values but my brain is fried and I can't figure it out. 

Any help is appreciated thanks!

 

 

 

cancel screen 2.png

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @sharpmachine555 ,

    The easiest way would be to set a Variable at the OnCheck of the checkboxes

    UpdateContext({vChanged:true})

    then 

    If(
     vChanged,
     UpdateContext({showCancelDialog: true}),
     Navigate('Main Screen')
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @sharpmachine555 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard