cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Noa
New Member

Delete attachment of SharePoint list in PowerApps

Hi, 

 

I'm making an app where I can add photos to my sharepoint list through a camera in the app. 

 

My problem is that I can only add pictures and can't delete them anymore. 

 

I've created delete buttons that seem to work at first. After submitting the form this seems to go well with new photos. Yet every time I go back to home and again to the device it turns out that the new photos are added to the 'deleted' one(s) instead of overwriting them. See attachment.

 

My code is as follows:

At the camera to add the photos:

 

Set(
varName,
GUID()
);
Collect(
colImages,
{
DisplayName: varName & ".jpg",
Id: varName & ".jpg",
Value: Camera1.Photo
}
);

 

 

To delete my pictures I use:

(trashcan image): Set(ShoutoutToDelete, ThisItem); Set(ShowDeleteConfirm, true)

(pop-up): Remove(colImages,ShoutoutToDelete); Set(ShowDeleteConfirm, false)

 

To submit my form I use: 

Set(IsReset, true); Set(bevestigSchermOpen, true); SubmitForm('Informatie automaat'); Refresh(automatenlijst); ViewForm('Informatie automaat')

 

I hope someone can help!

Thanks in advance

0 REPLIES 0

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (7,009)