cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamras
Kudo Kingpin
Kudo Kingpin

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
Dual Super User II
Dual Super User II

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
Dual Super User II
Dual Super User II

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

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

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

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,166)