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!
