Hi Everyone,
Good day!
I would like to ask for your help regarding the scenario below:
I have a list named request attachments. This attachments contains column request id, path of file etc.
the files are stored in a sharepoint library named Attachments and with the subfolder of request attachments request id column.
My question is. How to delete the subfolder in Attachments when an item in request attachments is deleted.?
If I delete request id 1 in request attachments list. It will also delete folder named "1" in Attachments directory folder.
Solved! Go to Solution.
Hi @YamiteKudasai ,
To achieve this, the 'For a selected item' trigger should be used instead of 'when an item is deleted' because the second trigger doesn't return any column value e.g. request id, path...
So we can't delete the item directly, instead we select an item and run the flow. The flow will delete the item and folder.
Sample:
ContentType eq 'Folder' and RequestId eq '@{outputs('Get_item')?['body/RequestId']}'
Best Regards,
Wearsky
Hi @YamiteKudasai ,
To achieve this, the 'For a selected item' trigger should be used instead of 'when an item is deleted' because the second trigger doesn't return any column value e.g. request id, path...
So we can't delete the item directly, instead we select an item and run the flow. The flow will delete the item and folder.
Sample:
ContentType eq 'Folder' and RequestId eq '@{outputs('Get_item')?['body/RequestId']}'
Best Regards,
Wearsky