Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > General
  New Posts New Posts RSS Feed - Attachment Name Length
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Attachment Name Length

 Post Reply Post Reply
Author
Message
wlinsley View Drop Down
New User
New User


Joined: 22 Jan 2016
Location: New York
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlinsley Quote  Post ReplyReply Direct Link To This Post Topic: Attachment Name Length
    Posted: 23 Oct 2017 at 4:09pm
Hi,

I'm trying to determine the filename length (number of characters) of an attachment. I'm using a trigger action with an Operation of Get Length to set a variable and I'm getting a value, however, the value is of the "preview" file name not the actual file name length. 

What I mean by preview: if the file name is too long to display in a message, at least for Outlook, I get something like this (note i'm shortening the file name here for this forum post)

123456789012345678901234567890123....pdf

When the actual file name is this:

1234567890123456789012345678901234567890.pdf

Turns out that "preview" length is 79 and that is the value I'm getting in the Operation I mentioned. I'm trying to avoid file names longer than 128. But my If Block is not working because it only gets 79.

Thanks in advance for any help or suggestion with this.

Walt


Edited by wlinsley - 23 Oct 2017 at 4:10pm
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 2017 at 6:35am
Is the filename you are trying to obtain from the actual filename attached to an Email that you are pulling in?
Back to Top
wlinsley View Drop Down
New User
New User


Joined: 22 Jan 2016
Location: New York
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlinsley Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 2017 at 7:11am
Yes, attached not embedded.

I trying to do this a script unless you have a better suggestion.


Edited by wlinsley - 25 Oct 2017 at 7:12am
Back to Top
Bartolome View Drop Down
New User
New User
Avatar

Joined: 08 Nov 2017
Location: Seattle
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bartolome Quote  Post ReplyReply Direct Link To This Post Posted: 20 Nov 2017 at 2:20am
What script are you using to achieve this?
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 20 Nov 2017 at 9:24am
Attachment file names are also extracted to the built-in variabe %msg_attachments%.

In cases where there are multiple attachments in an email they are all added to the same variable in the below format;

filename1.xml ; filename2.pdf

You could try using the built in variable %msg_attachmnts% and then use logic based scripting to sanitize it and pull out the filenames you want.
Back to Top
wlinsley View Drop Down
New User
New User


Joined: 22 Jan 2016
Location: New York
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlinsley Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 2017 at 3:57pm

Thanks for reply.

As a test, I tried as you suggested but got same result as I described in OP. I sent email with an attachment and set a variable filenamelen with %msg_attachments%. The filename is very long (I'm trying to detect the long ones). I then do a 'Send An Email" with the filenamelen in body and the file name still gets cut off, see below.

Actual file Name:

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234xxx.pdf

Result from %msg_attachments%:

123456789012345678901234567890123456789012345678901234567890123456789012....pdf

Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 06 Dec 2017 at 7:09am
If its getting off I assume you mean when you view the email you recieve?

I believe this is just how your email client is displaying it, which you can't really control.

To confirm the full subject is actually being sent, look in the Header Information of the email you recieve to see if the Subject does or does not contain all the characters from the filename.
Back to Top
wlinsley View Drop Down
New User
New User


Joined: 22 Jan 2016
Location: New York
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlinsley Quote  Post ReplyReply Direct Link To This Post Posted: 13 Dec 2017 at 9:48am
Yes, I agree. Found this link that pretty much confirms it.


I will explore scripts again as was suggested to see if I can get the proper length.
Back to Top
wlinsley View Drop Down
New User
New User


Joined: 22 Jan 2016
Location: New York
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlinsley Quote  Post ReplyReply Direct Link To This Post Posted: 15 Dec 2017 at 8:49am
Interesting tidbit:

I noticed that some emails coming in with attachments showed the full file name and not the abbreviated version I've mentioned. Turns out, if you drag an attachment into an open email it abbreviates the name, if you copy and paste then the full name is shown. 
 
I ran each through my triggers and as expected the attachmentname variable shows either the abbreviated or full length name. 


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.078 seconds.