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 Apps / Code used to set a For...
Power Apps
Unanswered

Code used to set a Form to edit mode is still running on page even though it has been removed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I previously set the DefaultMode of a form to: If(type="Admin", FormMode.Edit, FormMode.View)

I have since removed that code so now the form should open in FormMode.Edit. BUT, the code is still running when I view the form! Both locally and when saved and published. This has been happening for the last couple of hours. 

 

Any ideas on this? Thanks!

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    One thing you could do to make sure the code isn't located anywhere for any reason is to go to File > Save As > Save to Computer.

    This will save a .msapp file which you can extract. The extracted folders will have a folder called "Controls" with a few .json files (one for each screen). You can open this in Notepad or a JSON viewer and then search this text for "Admin" or "FormMode.Edit" etc to see if it shows up anywhere.

    Unfortunately if the code isn't anywhere in your app I'm not sure what bug would cause this.

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much. I was also looking for a way to view the entire code as you described. I didn't find anything related to my problem so I will keep searching.

     

    Thank you!

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 Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard