cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (32,170)