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 / Is there a way to clea...
Power Apps
Unanswered

Is there a way to clear previous catche data from the form on power app when running on preview?

(0) ShareShare
ReportReport
Posted on by 240

Hi Team

 

Is there way to clear previous data from the form, when running power apps on preview? I notice each time launch a form, data does not gets cleared. Is it because when the form is on DisplayMode set to Edit not new?

Categories:
I have the same question (0)
  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Yes you can add the the code in the OnSuccess property of your form or in the button that navigates to the Form Screen 

    NewForm(Form1)

    And if you want to have data in your form by selecting the Dataset that you want to work on you can add 

    EditForm(Form1)

    in the appropriate control

  • gcizman2024 Profile Picture
    240 on at

    @DBO_DV , where can this be used here?

     
    OnSelect property this code on Button
    SubmitForm(EditForm1); ViewForm(EditForm1);
    Notify("Request submitted for review and approval.", NotificationType.Success);
  • Verified answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    You can use it like this in the OnSelect property of your button yes.
    SubmitForm(Form1)ViewForm(Form1);
     
    This part of the code however i would put in the OnSuccess property of your Form. Like that the notification only appears when the form is saved in the Datasource 
    Notify("Request submitted for review and approval.", NotificationType.Success);
  • gcizman2024 Profile Picture
    240 on at

    @DBO_DV  isnt onSuccess deprecated to new Microsoft 365? I only see onSelect property on Advance mode whether i filter search on the property dialog i dont see its no longer there.

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    You have to Select the Form, there you have the possibility to use OnSuccess and onFailure

    DBO_DV_0-1711008862410.pngDBO_DV_1-1711008877489.png

    You just need to make sure that you select the whole Form and not just one DataCard

  • gcizman2024 Profile Picture
    240 on at

    @DBO_DV , like i said earlier on which version of microsoft product you in? Basically i followed your steps, but still look below;

    gcizman2024_0-1711016685021.png

     

  • gcizman2024 Profile Picture
    240 on at

    @DBO_DV my apologies, now i see but the button is not showing the status message either when the form is on edit mode nor new its not showing the notification status. Can you perhaps help me to achieve that both fail and success to handle it correctly. So acan apply,

     

    gcizman2024_1-1711017222524.png

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    My version: 3.24031.25
    but there haven't been any changes in the last year on this control and nothing planned. 

    you are not searching on the right place.

    DBO_DV_0-1711017262402.png

    You need to select SHEQ-Main-Capture and search in the dropdown with "DataSource" for "OnSuccess"

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    So you mean, when you Save the form to your data source the Notification from Notify(...) is not showing?
    Did you try it in the preview of the app or with the Alt-key?
    Could you show me the code as well as where you put it? 

  • gcizman2024 Profile Picture
    240 on at

    @DBO_DV , notification part does show now thanks, can we do validation for an empty fields before submit(success and failure)? Can you also show me how to enable the buttons when there is an empty fields, once fields are inserted it activates the buttons?

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