Forum Discussion
Clear a variable when a custom SharePoint libary form closes
I customized one of my lists forms with PowerApps. One of the things I wanted was for a user to be able to continue to work on the form when they pressed the Save button. This would cause the form to go back to record 1 in the list, but I got around that by setting a variable to capture the new record in a variable.
2 Replies
Try setting below formula for all these properties:
- SharePointIntegration.OnView
- SharePointIntegration.OnEdit
- SharePointIntegration.OnNew
Set(MyVariable, Blank())
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- jordancnolanCopper Contributor
Thanks for the tip, but OnEdit will not work for me because the user brings up the wrong record in the View. OnNew does not matter since it is bringing up a new record.
The issue I am having with the OnView opiton is that the form does not really unload in the background unless I refresh the page. So if the user mistakenly clicks off the form to the list and clicks another item, they variable does not have the option to update.