cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Parisa
New Member

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

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
8 REPLIES 8
yashag2255
Dual Super User II
Dual Super User II

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!
 

hi , thanks for your reply .

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

p1.PNG

 

yashag2255
Dual Super User II
Dual Super User II

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!

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
Dual Super User II
Dual Super User II

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-...

 

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!

 

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.

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)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,276)