cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lakishar
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
v-micsh-msft
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

4 REPLIES 4
v-micsh-msft
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

Thank you, this worked!

Hi there,

 

is it also possible with two or more attachments?

 

Best regards.

Aimén
Frequent Visitor

How could I Filtered and Collect attachements data !!! 
Please Heelp

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (74,013)