cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamras
Impactful Individual
Impactful Individual

Attachments - concat all file names

Is there a way to concat all the file names into one variable?

I'm using below to add a note when file is deleted but I also need to note when files are added.

Patch(Notes,  Defaults(Notes), {Notes:"Deleted: " & DataTable2.Selected.'File name with extension', Title: _varGallery.RFNum, Subject:"Main File Deletion"}))


This is the note I have so far when files are added where DataCarValue29 is the attachment control.

If(CountRows(DataCardValue29.Attachments)>0,Patch(Notes, Defaults(Notes), {Notes: "Main files uploaded", Title: _varGallery.RFNum, Subject: "New Main Files"}));

But rather than  saying "Main files uploaded" -- I want it to display the file names.
For example: attachment.jpg; document.docx

When I tried to create/update variable using the controls OnAddFile property, I could not get it to capture the file name and received "Expected Text Value" on _filename variable

UpdateContext({_filename: DataCardValue29.Attachments.Name})
1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Community Champion
Community Champion

hI @Tamras 

 

Use Concat(attach.Attachments.Name,Name &";")

 

where attach is the attachment control name (put yours there)

 

Regards,

Reza Dorrani

 

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

2 REPLIES 2
RezaDorrani
Community Champion
Community Champion

hI @Tamras 

 

Use Concat(attach.Attachments.Name,Name &";")

 

where attach is the attachment control name (put yours there)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Tamras
Impactful Individual
Impactful Individual

@RezaDorrani Thank you so much. One of the formulas I used was incomplete. I had

Concat(DataCardValue29.Attachments.Name & "; ")

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,583)