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 / ADD ATTACHMENT IN GALL...
Power Apps
Answered

ADD ATTACHMENT IN GALLERY CONTROL

(0) ShareShare
ReportReport
Posted on by 32

Dear Expertise, 

 

I want to save attachments from the gallery (To save attachments from the UI of PowerApps to particular item on SharePoint List). What should be my approach and the code? As you can see below, I have taken the attachment control from the form and pasted on the gallery, not sure how to save data through it. Is it possible to do it? Or is there any generic way to do it? Please suggest.

QASE1.PNG

 

Here is the code on OnSelect properties for my Submit button.

QASE2.PNG

 

Can someone provide me guidance/help on this? Please share screenshots as i'm a beginner on PowerApps.

 

Thank you in advance,

Athirah

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Athirah <

    The only two ways of saving attachments are SubmitForm() from a form or via Power Automate. You cannot save them from a re-purposed attachment control in a gallery.

     

    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.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Athirah ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Athirah :

    Do you want to add attachments through Gallery?

    If so,this is impossible in theory, but I have a alternative solution.

    The main point of this solution is to submit attachments through an invisible form. I've made a test for your reference:

    1\My data source:

    1.JPG

    2\Add an edit form control(Form1)

    DataSource

    BookLog

    Item

    Gallery4.Selected /*I'll create Gallery4 later*/

    3\Add a gallery control 

    Items 

    BookLog

    4\Unlock Form1's Attachment data card and copy the Attachment control(DataCardValue3) into Gallery4(DataCardValue3_1)

    2.JPG

    5\Set DataCardValue3_1

    Items

    ThisItem.Attachments

    OnAddFile

    ClearCollect(TheActh,Self.Attachments);SubmitForm(Form1); /*TheActh is my custom variable*/

    6\Set DataCardValue3 (which in form1) 's Items property to

    TheActh

    7\Set Form1‘s Visible property to 

    false

    16.gif

    Best Regards,

    Bof

  • Rg129 Profile Picture
    6 on at

    Just wondering is there a way to get onremovefile to work? I’m struggling with that. 

  • KatiaG2131 Profile Picture
    2 on at

    Hi @v-bofeng-msft , 

    Do you know how I can delete a file?

  • emanuelntb Profile Picture
    2 on at

    The only way I can think of is deleting all attachments first, via power automate, then using submit form.

  • jed76 Profile Picture
    on at

    Hi Warren. Any ideas how I can achieve this please.

     

    i want the user to be able to browse files which are coming from a SP List, select one and then by using some kind of attachment control, add the selected file to another list. Is this possible?

     

    I want to display attachments in a gallery - the ITEMS would be something along the lines of: FILTER(CRUD2, JobGantt.Selected.ProjectId in ‘Filename with extension’) I would like them filtered so that only relevant files are shown. Then, when one is selected, it appears in second attachment control to be uploaded to another list?

     

    Many thanks.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @jed76 ,

    This is an old closed thread - can you please post a new thread with some more detail on what you are trying to do.

  • jed76 Profile Picture
    on at
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @jed76 ,

    Another responder has already spent some time trying to help you - please follow this through.

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 739 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 268

Last 30 days Overall leaderboard