cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted

Thank you, this worked!

Highlighted

Hi there,

 

is it also possible with two or more attachments?

 

Best regards.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,101)