Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Working with Attachments Control

(1) ShareShare
ReportReport
Posted on by 10
 I have an attachment control in a form. I use a Power Automate flow with a power apps triggers to update the data. This allows me to hide the data from the users as my service account does all updates.
 
I have a SharePoint list that needs to store multiple attachments in the list item. 

Without using any functions that require the user to have access directly to the list, when the user clicks the "X", I want the attachment to be immediately removed from the item. Similarly, if they press the "Restore" button that appears after deleting an item, i want the file to be immediately restored. I would prefer to do this through a power automate flow with the power apps trigger. 

 
This is all for the scenario where the item and attachments have already been saved, and the user is updating the item. Not for first time creation. 
 

 
I basically do not know how to save the file identifier to a variable for the specific attachment that was clicked. If I can find out how to find the file identifier, the rest of the flow is very simple. 

2nd Question:
Why does my "Open All" button only open 1 of the file attachments in the attachments datacard? 

 
OnSelect:


 
Any help is appreciated!
Categories:
  • Suggested answer
    SA-03101945-0 Profile Picture
    10 on at
    Working with Attachments Control
    The answer is to on file remove(or Undo) clear collect the original attachments on the item before any change is made, then clear collect the current attachment in the attachments control, then use a flow to remove the items not found in the current attachment collection that were previously found in the original attachment list by comparing the Value. You compare the value to determine if it is the same file or not.
  • WarrenBelz Profile Picture
    146,535 Most Valuable Professional on at
    Working with Attachments Control
    Hi
    I can give you a start on the first one - these three triggers on the attachment control should allow you to instigate the relevant Flow action
     
    Regarding the second question - the Launch() function opens up in a new tab, but always the same tab, so you only ever see the last fiel launched - I have seen this question many times and do not believe there is a solution.
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,535 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard