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 / Attach multiple attach...
Power Apps
Answered

Attach multiple attachments from a gallery list to SP list

(0) ShareShare
ReportReport
Posted on by 30

Hi MVP's,

 

I need some help, I am building a solution where I have create a dynamic Gallery that I add line items, for each line item there is 2 or more attachments that i need to add, this is all collected in a collection, and from there I need to write it to a SP list, can someone help me please

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @JJ8810 ,

     

    It depends how you generate the collection that includes multiple attachments. In short words, the collection needs to include an Attachments field with columns as follows:

    vjefferni_0-1679551103004.png

     

    Best regards,

  • JJ8810 Profile Picture
    30 on at

    Hi Thanks for the respons, i actually managed to get it write after hours of online time and Youtube, below is the code i used and the link to the Video

     

    https://youtu.be/npvAQLZaG1c

    @ShaneYoung @RezaDorrani  not sure if they could make this better, but it did help me out alot.


    //Prepair Sub-Gallery Attachements to be uploaded to SP List
    Ungroup(
    ForAll(
    ListOfBiidersSelected.AllItems,
    ForAll(
    RFQDocumnt.AllItems,
    Collect(
    VImage1,
    {Value: ThisRecord.Value}
    );
    Collect(
    dataCollection,
    {
    Name: ThisRecord.Name,
    base64: With(
    {
    varDemoFromAttachmentControl: JSON(
    Image4.Image,
    JSONFormat.IncludeBinaryData
    )
    },
    Mid(
    varDemoFromAttachmentControl,
    Find(
    ",",
    varDemoFromAttachmentControl
    ) + 1,
    Len(varDemoFromAttachmentControl) - Find(
    ",",
    varDemoFromAttachmentControl
    ) - 1
    )
    )
    }
    )
    );
    //Patch Bidder Information
    Patch(
    'List_of_Bidders new test',
    Defaults('List_of_Bidders new test'),
    {
    Title: title,
    ReceivedFrom: ComboBox1.Selected.DisplayName,
    company: company,
    email: emails,
    BU: "BU" & Mid(
    title,
    4,
    3
    ),
    Discipline: discipline,
    DueDate: duedate,
    ServiceType: "Sub-Contractor",
    ProjectName: txtProjectName.Text,
    EDSNextProjectNumber: txtProjectNumber.Text
    }
    );
    Refresh('List_of_Bidders new test');
    //Create Collection for Flow Upload of attachments
    Collect(
    BigCollection,
    {
    ID: First(
    Sort(
    'List_of_Bidders new test',
    ID,
    SortOrder.Descending
    )
    ).ID,
    AttCollect: dataCollection
    }
    );
    'PowerApp->Compose'.Run(
    JSON(
    BigCollection,
    JSONFormat.IndentFour
    )
    );
    RemoveIf(
    BigCollection,
    true
    );
    RemoveIf(
    dataCollection,
    true
    )
    ),
    "Value"
    );

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @JJ8810 ,

     

    So, you are using Power Automate to add attachments to a newly created item now, which is good and exactly the way we achieve that need. Nice work!

     

    Best regards,

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