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 / Prevent Navigation if ...
Power Apps
Unanswered

Prevent Navigation if form is in Edit Mode - Can't get my popup message to work

(0) ShareShare
ReportReport
Posted on by

I have disabled my back icon with the following OnSelect formula: 

If(frmRequestHelp.DisplayMode = DisplayMode.Edit,DisplayMode.View,Back())

 

It works just fine.  I can navigate when my form is in view mode and not edit mode. 

 

I am, however, trying to get a popup label to show when the icon is in DisplayMode that explains you can't navigate until you cancel or save your changes.  However, I cannot get it to work.  I created a label to see if I can find out what is going on and the label is not working so I'm sure there is something wrong with my formula, but I can't see what it is.  

Here is my test label formula text.  

If('icnBack-scrRHD'.DisplayMode = DisplayMode.View, true,false). 

It never changes from false; it does not toggle from true to false like the back icon does. 

Here is my formula from the actual pop up label Visible property

 

If('icnBack-scrRHD'.DisplayMode = DisplayMode.View,true,false).

 

I'm having trouble understanding why my pop up label will not work nor does the text label but the icon works exactly as I'd like.  

Thanks in advance. 

 

 

 

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    on at

    Hi @CindyZ ,

    You shouldn’t put DisplayMode.View to OnSelect property. DisplayMode is enumeration type and DisplayMode.View is Text, not a behavior formula, so it can’t change the display mode of icon.

    you should set icon’s display mode in DisplayMode property directly. Please refer to following formulas.

    • set OnSelect property of Icon as below:
    Back() 
    • Set DisplayMode property as below:
    If(frmRequestHelp.DisplayMode = DisplayMode.Edit, DisplayMode.View, Edit) 

    Then, continue with your steps and check if the issue is fixed.

    Best regards,
    Sik

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