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 / Controls holding value...
Power Apps
Unanswered

Controls holding values after exiting app

(0) ShareShare
ReportReport
Posted on by 123

Not sure how to describe this but here we go...

 

I have a list where the Project Assessment Column is decided based on what checkbox you pick in the app. Easy... 

 

When the Form Mode = "New" the project assessment should be blank, and allow you to set it via the checkbox selection.(red = full, yellow = moderate, green = low, white = basic)

 

When the Form Mode ="edit" the project assessment should have the value set at it's creation, and NOT be able to be changed by the check boxes as they are disabled. 

 

Currently, when I start a new form, make my checkbox selection, and leave the app without saving or submitting the form, the same checkbox is selected when I view other items in the list, AND it changes the project assessment level to whatever checkbox was selected when I exited the app....Not Great. Hopefully these pictures clarify!

 

Current List and Assessment Level -Correct

CamCov_0-1645736722577.png

App state after pressing "New (item)" -Correct(assessment = blank)

CamCov_1-1645736803605.png

App state after pressing New AND making my Project Assessment Selection -Correct(assessment =checkbox level)

CamCov_2-1645736874650.png

After closing out of the app, AND opening an existing item in the list - incorrect(assessment = checkbox selected above!)

CamCov_3-1645737034869.png

As you can see, T2 should be showing "Moderate" as it was opened in "Edit" mode, but it is instead holding the value of the cancelled selection and overriding the value that should be in there. 

 

This is a very weird and confusing problem so please don't hesitate to ask for clarification. 

 

Control in question code:

CamCov_4-1645737528053.png

 

Thank you in advance!!

 

Edit: Spelling

 

 

 

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @CamCov 

    A SharePoint integrated for does not "exit". When you click on an item or new from SharePoint, it will then load your app.  When it "disappears" it is just that - it performs the RequestHide() action which hides the screen.  It never exits or closes.  When you click on another item or new, it will cause the app to simply re-appear.  It does not re-load it.

    The only way to do that is to exit the actual browser screen and then go back to it in another session.

     

    So, it is imperative that the Item property of the form is accurate and that the proper actions are occurring on the OnNew, OnEdit, OnSave, etc of the SharePointIntegration object.

     

    So, I would first have a look at those properties and actions and see what is going on there - while keeping in mind that your app is never actually closing, and see if you can discover the problem from there.

     

    If not, then post back all of your formulas for the Onxxx actions of the Integration object as well as the Form Item property.

     

    I hope this is helpful for you.

     

  • CamCov Profile Picture
    123 on at

    That is a little annoying but makes sense, I was able to get the Project Assessment Data Card showing the correct value. But now I want to reset the checkboxes after "closing"(I know it doesnt close) the app. I have tried just putting the Reset(checkbox) in the OnStart of APP, and OnCancel/OnEdit of the SharePoint Integration with no luck as it still holds that checkmarked box. Where would you do this? 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @CamCov 

    Well, first of all, realize that a Reset on a control will only reset it to its Default value.  So, for a checkbox, if the formula in the Default is true or evaluates to true, then resetting the checkbox will reset it to being checked.

    So, realize that and take a look at your Default properties to determine if they will actually change to what you expect.

     

    Next, OnStart of the App will only occur once - when the app starts.  Every time you click on an item in your list or new, it will re-show the form, but OnStart has already happened, so it will not re-evaluate that formula.

     

    The OnEdit, OnView and OnNew actions will all occur respective to what the user chooses.  Those will happen each time.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard