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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,500)