cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.
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.
lakishar
Level: Powered On

Re: Save Attachment to Collection

Thank you, this worked!

PowerAnalytics
Level: Powered On

Re: Save Attachment to Collection

Hi there,

 

is it also possible with two or more attachments?

 

Best regards.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 54 members 4,313 guests
Please welcome our newest community members: