Dec 09, 2017 04:56 AM
Hello,
I need to download a CSV file, displaying the name of the attached files of an Attachment field (without the link).
Do you know how to display only the name of the attached documents ?
Thanks a lot for your help !
Milarépa
Solved! Go to Solution.
Sep 23, 2019 01:00 PM
Dec 09, 2017 03:13 PM
This is based on a tip I posted in ‘Show And Tell’ a while back — with one modification I’ll explain in a moment.
To extract just the name of an attachment, create a formula field using this formula:
LEFT(Attachments,FIND(" (http",Attachments)-1)
[Note that within the FIND()
function there is a leading space before the open parenthesis (’(’) character.]
If there are multiple attachments in the {Attachments}
field, this will extract the first one returned. (And which is the first one returned? I think it’s the latest one added…)
The original version of this formula, as given in my post, included this call to FIND()
:
FIND(" ",Attachments)
.
When I dropped that into a field to double-check the formula before replying to you, though, I discovered one of the attachments in the table I had chosen at random happened to have an embedded space before the file extension, clipping the ‘.pdf’ from the file name. Assuming none of your attachment names contains an embedded ’ (http’, the modified formula should work fine.
Dec 10, 2017 01:21 PM
Perfect ! Thanks a lot for your help
Sep 23, 2019 12:54 PM
Hello!
thanks works fine. I am wondering if it also possible to remove the file type in the name?
Example: attachmentname.pdf = attachmentname
Sep 23, 2019 01:00 PM
Sure:
LEFT(
{FullAttachmentName},
FIND(
'.',
{FullAttachmentName}
)-1
)
Sep 23, 2019 01:10 PM
wow thanks for your fast help! :heartpulse: :slightly_smiling_face: