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 clear data from...
Power Apps
Unanswered

How to clear data from-PowerApp Custom Form - SharePoint List

(1) ShareShare
ReportReport
Posted on by 10

Hello ,

I have customized form in a sharepoint list .

When the user clicks "New" and enters data, but  they clicks on x (close button) instead of clicking "Cancel" or "Save" on ribbon , the data in the controls will remain the next time he clicks "New".
 
sharePointIntegration.onCancel=ResetForm(SharePointFormNew)
 
when they Click on "cencel" the form will reset .but the close button is the problem .
 
 I really appreciate any help you can provide.
 
Parisa
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    hi @Parisa 

     

    Can you try to set the "OnSelect" property of your close button as: ResetForm(SharePointFormNew)
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     
  • Parisa Profile Picture
    10 on at

    hi , thanks for your reply .

    I actualy want to do that , but I dont know how can i do it?!

    p1.PNG

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Parisa 

     

    Click on the "Customize with PowerApps" button visible in the screenshot that you have shared. Now, This will open the app in edit mode.
    Navigate to the specific Screen, select the "X" icon, now paste the below expression on the "OnSelect" property of this control:
    Reset(SharePointFormNew)
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Parisa Profile Picture
    10 on at

    Thank you for your explanation.

    As you can see in the following image , I do not have access to the Sharepoint Ribbon.

    Unfortunatly I can not find it.

    p2.PNG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Parisa 

     

    Just missed the previous scrennshot, so I see that you are trying to customise the ribbon of the SP default form and this action is not supported with powerapps right now. 

     

    More details on customising creating SP List/Site ribbons : https://www.c-sharpcorner.com/article/adding-custom-action-to-the-ribbon-of-view-in-sharepoint-list-library/

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Parisa Profile Picture
    10 on at

    Thanks for the link .Smiley Happy

    I'm still looking for a way to show my form without data by clicking on "New".

    when i set :

    sharepointintegration.OnNew=NewForm(SharePointFormNew);

    the previous data still are there.and when i set :

    sharepointintegration.OnNew=NewForm(SharePointFormNew);ResetForm(SharePointFormNew);

    my form will refresh automatically and i'm not able even to scroll it down.

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Have you tried changing the order of the functions in the "sharepointintegration.OnNew" and reset the form first then change the form mode to new.

     

    Example:

    sharepointintegration.OnNew = ResetForm(SharePointFormNew); NewForm(SharePointFormNew)

  • Parisa Profile Picture
    10 on at

    Thanks for your Idea @Jeff_Thorpe ,

    no I did not try that .

    I just tried it, the same problem. the page refresh automaticly and i am not even able to scroll it .scroll jumps up.

     

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