cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Remove Attachment when the Number of Attachment is 1

When Max Attachments is set to 1, Remove Attachment action does not remove the attachment, instead puts Strike-through on the file. Add New Attachment is not available after removing the first and only attached file. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @arevsun1 

 

Thanks for sharing the details. I followed the steps share by you and confirm that I am also seeing the same behavior.

 

I was able to add another attachment once the attachment is removed and form is submitted again. As a workaround to this, you can set the OnRemoveFile property of the attachement to:

If(Form2.Mode = FormMode.Edit,SubmitForm(Form2))

 

Here Form2 is the name of form control.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

6 REPLIES 6
Dual Super User II
Dual Super User II

Hi @arevsun1 

 

I carried out a test on my side and I am able to delete the attachment even if the max attachment is set to 1. Can you share more details so that we might be able to help you better.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks for the reply!

The Attachment control is inside of a form which is connected to a SharePoint list. As mentioned in the original post, the only customization is done with changing the MaxAttchaments to 1. 

Hi @arevsun1 

 

That's weird. I carried out a test on my side and I am able to see the X icon.
 
qwe.pngHope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

That is weird, considering that I am not doing anything extraordinary. 

Could you please try the following scenario?

Add an attachment. Save the form. Open it again. Remove the attachment and try adding an attachment again?

Thanks, appreciate you looking into the issue!

Hi @arevsun1 

 

Thanks for sharing the details. I followed the steps share by you and confirm that I am also seeing the same behavior.

 

I was able to add another attachment once the attachment is removed and form is submitted again. As a workaround to this, you can set the OnRemoveFile property of the attachement to:

If(Form2.Mode = FormMode.Edit,SubmitForm(Form2))

 

Here Form2 is the name of form control.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Thanks, I see your logic. You were very helpful! 

Only it worked after adding ViewForm(formName); EditForm(formName) followed by SubmitForm() action. 

 

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.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (23,690)