cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nrvrvl
Helper I
Helper I

Attachment Control Not working in edit mode

I want to remove existing file and add new attachment. But there is undo option only. I want to add new attachment.

Attachment has 1 MaxAttachments.

 
 
 
 
 
 
 

img2.png
Currently, this attachment is in edit mode but I want to remove this item and add new item. 

Help!

 
 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @nrvrvl ,

This should do it - put this on OnRemoveFile

UpdateContext({varRemoved:true})

then this on MaxAttachments

If(varRemoved,2,1)

finally when you save the form

SubmitForm(YourFormName);
UpdateContext({varRemoved: false})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

3 REPLIES 3
flugaoveltem
Resolver III
Resolver III

Hello @nrvrvl 

You could submit this edit form to remove this attachment and then add another. 

Have you tried that ? 

Hi @flugaoveltem ,

Actually this attachment is from Gallery Item. And in Edit form mode. Max attachment is 1 which is already selected. And I want to remove this so I can add another one. 

 

Do you know any solution?

Hi @nrvrvl ,

This should do it - put this on OnRemoveFile

UpdateContext({varRemoved:true})

then this on MaxAttachments

If(varRemoved,2,1)

finally when you save the form

SubmitForm(YourFormName);
UpdateContext({varRemoved: false})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,244)