TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Document Button Filename Customization or at least Reasonable Default
I know this is not the case now, but I want to ask if you would kindly consider making an enhancement on the document button. When you click the button to make a doc now, it merges to Word, but you always get the same file name.

I would like to have TeamDesk somehow put the table name, id, and timestamp into the file name of the downloaded file. That way there is some kind of logical link to the record.

For example, if I have a table called Orders, and I have a doc button, I would like the downloaded file to automatically be something like -

Orders - 232 - 20111215-13:35:03.docx

Something like that where 232 is the Id number, and the date following is the date the doc was created, or, is the date the order was made. The use case is, if data operators are downloading a lot of these merged word files, it is easy to make a mistake when processing them, if they are all the same name.

If the Document setup screen had a way to specify the filename, that would be great, but in lieu of that, a reasonable default would be acceptable. Another idea is to perhaps allow the template name to be a part of the name, but automatically prepend or append the record`s aspects to that.

Sincerely,
Rick Cogley
ID
489
Category
User Experience
Author

Rick Cogley
Date Created
2/14/2012 6:54:56 PM
Date Updated
6/11/2013 2:50:46 AM
Status
Implemented
Score
30
Promoted By
Shem SargentbasenineRick Cogley
Comments
Rick Cogley 2/14/2012 6:57:35 PM
I originally asked this question directly to support and Kirill gave me the following advice, for everyone's benefit -

===
As a workaround, you can use the Formula - URL to print the document with desired file name:

URLRoot() & "/documentopen.aspx/" & URLEncode("filename.docx") & "?d=<doc-id>&id=" & RecordId()

<doc-id> is the number following document= in a document's view page in Setup.

In the example, filename is a string but can be easily constructed from parts.
===

Rick Cogley 2/14/2012 7:02:29 PM
Based on Kirill's advice, I made a Formula-URL column, using the following formula to get a button on every record. Assume 99999 is the doc-id he refers to, for my particular document.

URLRoot() & "/documentopen.aspx/" & URLEncode("MyCo-XYZ-Report-" & [Client Code Upper Case] & "-" & [Id] & "-" & Replace(ToText(ToDate([Date Modified])), "-", "") & ".docx") & "?d=99999&id=" & RecordId()

This results, for a hypothetical record with Id 123, in a downloaded filename as follows -

MyCo-XYZ-Report-123-20120214.docx
Rick Cogley 2/14/2012 7:04:09 PM
But of course, the point to this IdeaExchange post is to get something similar for the VIEW mode of a particular record, where the Document's button shows up. Clicking that button will still just give a generic filename, based on your doc template's filename, when you upload it.
basenine 8/3/2012 1:54:42 AM
Thanks for putting all this up here Rick.

I've used your method today and I agree it would be a useful feature for TD to have.

In the Setup mode for a Document, you could have a Custom File Name edit field that would allow you to create a formula that would be used as the file name.
basenine 9/25/2012 9:20:46 PM
I'm guessing the possible drawback with this idea is non file name characters...

: # etc would need to be filtered.

This can be achieved with my previous comment though.

Say a filename is Invoice: {mm}/{yyyy}-{0}

you can remove the Invoice: by
NotLeft([Invoice Id], 9)

Over to Teamdesk for an idea on if this could be implemented ;)
Slava Shinderov  Staff  6/6/2013 8:15:15 AM
@All we've added ability to specify formula for document file name on document setup screen.
Rick Cogley 6/6/2013 9:14:03 AM
Thanks, that's great!
Rick Cogley 6/9/2013 6:52:21 PM
For peoples' info, a couple examples -

"eSolia-Welcome-Pack-for-" & [Client Code Upper Case] & "-Users-" & Now()

"eSolia-BSI-Report-" & [Client Code Upper Case] & "-" & Replace(ToText(ToDate([Date Modified])), "-", "") & "-" & RecordId()
basenine 6/9/2013 9:41:54 PM
Nice - like the Replace() function
basenine 6/9/2013 9:51:13 PM
This function seems to already take into account the "/" in Id's and replaces them automatically with "_". So in my 'Just now experience' with one I created as a test, I didn't need to use the Replace() function - so that's good.

Can see where the replace() function will come in handy though.

Cheers

BTW: here's the formula I used:

[Customer Name]&" - "&[Quote/Order Id]

where [Quote/Order Id] is formatted as "Quote: {MM}/{YYYY}#{0}"
Rick Cogley 6/11/2013 12:54:40 AM
In our setup, it replaces the -'s with nothing, so we get our usual YYYYMMDD format at the end of the filename. It's consistent with all our other filenames in the file server.
Slava Shinderov  Staff  6/11/2013 1:50:37 AM
@Rick please consider using "Format" instead of Replace(ToText(ToDate())), for example, following simple formula:

Format([Date Modified],"yyyyMMdd")

will do the job.
basenine 6/11/2013 2:46:45 AM
It would be nice to include the Print option in the View. i.e.
Have 'Print' in the same checkbox area as 'New', 'View', Edit, 'Delete', 'InLine Edit', 'Mass Delete'…. in View Setup
With the addition of Filename customisation to the Document button, this would be useful and certainly better than the Formula URL option as described at the top.

My FormulaURL came unstuck today as the [Customer Name] had an '&' in their name (i.e. B & S Shopfitters)… Thankfully I was able to use the Replace() function in this case.

After doing a bit of investigation, I noticed that the Document Print button (the one at the top of the page) has the html set as:

<button fs-action="d222222" type="button" class="fs-action">Print</button>

and that in the Table View area, buttons are set out like:

<button type="button" fs-action="b22382" fs-rowid="161" class="fs-rowaction">XYZABC</button>

Does this make sense?

Cheers
Rick Cogley 6/11/2013 2:50:46 AM
Interesting.

Slava, thanks for the tip. That works just fine.
Feedback
 
Back to Search Results