Greetings,
I am in the process of developing an application.
The workflow is as follows:
A user, acting as a requester, submits an inquiry.
Subsequently, another user (referred to as the solution provider) generates an Excel file containing a solution. This file is then attached to a SharePoint list through the application.
Upon testing and confirmation of the successful implementation of the solution, the requester approves the proposed solution.
In cases where the solution proves to be ineffective, the requester user has the option to reject it. Consequently, the attached Excel file associated with the solution will be removed from the list.
I am encountering a challenge in implementing a button control that facilitates the deletion of attachments. Despite my efforts, I have been unable to successfully accomplish this task. Is there anyone available who could offer assistance in resolving this matter?
Thank you.
"DataCardValue19_1" holds the attachment in the "Form4_2"
Hi @Nemesis_TR ,
How is the situation? Have you solved your problem? If you find my answer helpful, you can accept it as a solution to help more people trapped in this problem.
Best regards,
Rimmon Li
Hi @Nemesis_TR ,
The above code does not support apps that use SP as a data source. This is because it is not supported to delete the files in the attachment control in the SP list through the button, only click "X".
If you want to use the above code, you need to change your data source to the Dataverse Table.
If my previous answer is helpful, I hope you can accept it as a solution to help more people.
Best regards,
Rimmon Li
Thank you for the reply.
Appologies for my silly question. Please find my table below. in this how lookup must be formulated?
Is below correct? It didn't work like below 😞
Patch(APErrorHandlingList,
//your tableName
LookUp(APErrorHandlingList,Atatchments=DataCardValue19_1.Update),
//find the record according to condition
{AttachmentName:{FileName:"",Value:""}})
//Clear your attachment column
Hi @Nemesis_TR ,
Currently, it is not supported to delete the content in the attachment in the SP list through the button, only click "X". If you insist on doing so, you can change your data source to Dataverse Table and use the column of file to save your files.
Then you can try this:
Set the OnSelect of the Button:
Patch(TableName,
//your tableName
LookUp(TableName,Column1=Column1_DataCard1.Update),
//find the record according to condition
{AttachmentName:{FileName:"",Value:""}})
//Clear your attachment column
Best regards,
Rimmon Li