cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lakishar
Level: Powered On

Save Attachment to Collection

I am trying to save an Attachment to a collection from a form, but I am getting a table in my collection.  I am trying to provide a link to the attachment in gallery.

  1. Form Data Card info and Collect functionDataCard.png
Collect(LineItemsDetail2, {Category: DataCardValue27.Selected.Value, Description: DataCardValue30.Text, StartDate: DataCardValue32.SelectedDate, EndDate: DataCardValue33.SelectedDate, Destination: DataCardValue31.Text, Cost: Value(DataCardValue28.Text), ReportID: DataCardValue35.Text, AttachmentLinks: DataCardValue34.Attachments.Value});
  1. CollectionCollection.png

     3. Gallery - ThisItem.AttachmentLinks.Value

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Save Attachment to Collection

Hi,

 

The Attachments is defined as a table.

If you only have one attachment here, then you may take a try with the method below to get the Attachment Link:

First(DataCardValue34.'{Attachments}').value

Or Just take use of the Record from the Item property of the Form control, for example, the Gallery.Selected, then change the formula as below:

First(Gallery1.Selected.'{Attachments}').AbsoluteUri

Let me know if you need any further help on this.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Save Attachment to Collection

Hi,

 

The Attachments is defined as a table.

If you only have one attachment here, then you may take a try with the method below to get the Attachment Link:

First(DataCardValue34.'{Attachments}').value

Or Just take use of the Record from the Item property of the Form control, for example, the Gallery.Selected, then change the formula as below:

First(Gallery1.Selected.'{Attachments}').AbsoluteUri

Let me know if you need any further help on this.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

lakishar
Level: Powered On

Re: Save Attachment to Collection

Thank you, this worked!

Re: Save Attachment to Collection

Hi there,

 

is it also possible with two or more attachments?

 

Best regards.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,116)