Hi @louiserh ,
Do you want to delete a SP Library Item using canvas app?
Actually, the SP Library is essentially a List, so the same functionality applied to your SP List could also work for your SP Library.
You could consider add a delete button using SP format column feature in your SP Library, and then put the following JSON formula for formatting your column:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "='PutURLOfYourCanvasAppHere?ID='+[$ID]"
}
}
Then within your canvas app, set the OnStart property of App to following:
Set(ItemID, Param("ID"));
If(
!IsBlank(ItemID),
Navigate(EditScreen1)
)
Within the Edit Screen, set the Item property of the Edit form to following:
If(
!IsBlank(ItemID),
LookUp('Your SP Library', ID = Value(ItemID)),
BrowseGallery1.Selected
)
Note: I assume that you have generated a canvas app based on your SP Library already.
Please try above solution, then check if the issue is solved. And I think you are in right direction.
Regards,