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 / How to check if you ar...
Power Apps
Unanswered

How to check if you are working in edit mode and in run mode in Canvas app?

(0) ShareShare
ReportReport
Posted on by 66

I intend to do is not save the "login" to a canvas app when in edit mode, the only feasible way I gave is to ignore the admin role of my users table (SQL Server) as only that role can edit the canvas app, but I would also like to register that login by the admin user when they are working in run mode; so I would like to know if there is any way to verify if the canvas app is working in editing mode or in execution mode since this would avoid generating the login record when the canvas app is being edited. I hope there is some way to do it.

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

    Hi @MasterRA , 

     

    Do you want to get whether the current app is in edit mode or Run mode?

     

    If so, I'm afraid it is not available for now. But you can create a new idea through the below URL, then ask  your colleagues to raise up the votes.  

     

    Power Apps Ideas - Power Platform Community (microsoft.com) 

     

    The  product team has direct visibility of these ideas and they will implement it on the basis of the highest number of votes received. 

     

     

    Best Regards, 

    Bof

  • MasterRA Profile Picture
    66 on at

    What a pity that there is no current way to know if it is in execution mode or edition mode; although I don't think it will create an idea since it will surely not have as much support to be considered for implementation.

  • Verified answer
    Crash Profile Picture
    16 on at

    I managed to know if the app is in the editor by running the following code in the "OnVisible" property of the first screen:

     

    If(
        IsBlank(Host.Version) || IsBlank(Find("PowerApps-Studio", Host.Version)),
        Set(inProduction,true),
        Set(inProduction,false)
    );
     
    I notice during production if the app is running inside MS-teams "Host.Version" can return blank if the app hasn't fully loaded.
    Later I just need to ask
     
    If(inProduction, "Code I want to omit in the editor")

    Host.Version can also be used to determine the OS the app is running, I had a small issue with iOS, so I custom code a way around for them using this idea.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard