How to remove attachment from sys_attachment table

Pradyumna Das
Tera Guru

The Attachment type variables in the portal is not behaving properly. Once you add any attachment via attachment type variable a delete button will appear but if I click on that delete button the attachment is getting removed from the portal not from the sys_attachment table. So after clicking that delete button if I submit the form then that deleted attachment is getting populated which should not happen. Is there any solution for this except calling  GildeAjax from the onchange client script.