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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,165)