Jump to content
  • 0

Truncate File Name?


amayne
 Share

Question

In datapage > tabular report > results page...

 

for the file datatype, is it possible to modify the layout to truncate at x characters?  I know this is possible for text or url, but it would be nice to do the same for long file names.

 

maybe is it possible to hyperlink to a filetype field in an html block?

 

regards

~allen

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thanks for your response, but I prefer not to use a static file display name.

 

I had a play, & came up with this html block.  I would be interested to know if it can be done in a more concise or 'correct' way.

 

regards

~allen

var str1 = '[@field:SC_uploadCustomerContract]';
if(str1.length > 36) {
    str1 = str1.substring(4,36)+"...";
}
document.write("<a href='[@field:SC_uploadCustomerContract/]'>"+str1+"</a>");
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...