web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove attachments usi...
Power Apps
Unanswered

Remove attachments using Reset button

(0) ShareShare
ReportReport
Posted on by 50
Hi all,
New user to Power Apps. Using one of @RezaDorrani solutions I have a dropdown list for the attachment field that will add the selected option as a prefix tag to the filename being attached. That works fine when submitting. I also have a 'Reset' form button that resets all the fields but does not remove the attachments as expected. Has anyone run into this issue and how did you resolve?
 
Reset button formula:
Set(var,true);ResetForm(Form3);NewForm(Form3);Navigate(Home,ScreenTransition.Fade)
 
BonusCup_0-1663613736972.png 

 

In the OnSelect option in the Reset button I have tried:
  • changed from: Reset(DataCardValue7)
  • changed to: UpdateContext({ResetAttachment:true})
full formula: Set(var,true);ResetForm(Form3);NewForm(Form3);UpdateContext({ResetAttachment:true});Navigate(Home,ScreenTransition.Fade)
 
On the 'Reset' option for the Attachment field I entered "ResetAttachment", no quotes.
I saved off and ran but still having the same issue
 
Thanks for any help.
Categories:
I have the same question (0)
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Hey Try go to the default property of the attachment control and make it:

     

    If(!varResetAttach,Parent.Default)

     

    add this to the onselect of the reset button:

     

    Set(varResetAttach,true)

     

     

    If you need to set it false later you can try do that on visible.

    Let me know how this goes.

  • BonusCup Profile Picture
    50 on at

    Thank you for the quick response.  I tried your suggestions but received the error below.

    BonusCup_1-1663616546808.png

    BonusCup_2-1663616611687.png

     

     

     

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Okay Ignore my previous suggestion it seems that no longer works try this, I tested it on my side and it works:

    Step 1 click into the form the inside the attachment datacard or a new custom one either works insert a button

     

    Step 2 on this new buttons onselect add Reset(DataCardValue7) (Assumption made by your post that the attachment control is called DataCardValue7

    (image above for step 1 and 2)

     

    AJ_Z_1-1663743470249.png

     

     

    Step 3 make it invisible by changing the visible property

     

    Step 4 add a new button anywhere you want to reset it and on it's select write Select(Insert the name of the button we put inside the form)

     AJ_Z_0-1663743759767.png

     

     

    (Image relating to final step above)

  • BonusCup Profile Picture
    50 on at

    @AJ_Z 

    I tried your suggestions but it still did not work.  For testing I named the boxes 'Button2' and 'Button3' for the order in which you had created them.

    • For 'Button2', I placed the button inside the DataCardValue7 control as you did in your post.
      • Button2 OnSelect = Reset(DataCardValue7)
      • turned 'visible' off for 'Button2'
    • For 'Button3', I placed it inside the 'Attachments_DataCard1'
      • Button3 OnSelect = Select(Button2)

    When testing, the attached file was still there.  I turned 'Button2' visible back on and reran it so I could push either button and this did not work either.  The attachment was still present.

     

    BonusCup_1-1663768115321.png

     

     

  • stellarwheels Profile Picture
    60 on at

    I am also having this issue where all solutions don't work in clearing the attachments when another control is changed. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard