TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Displaying Documents in TeamDesk forms
Hello to you all

I have been using a TeamDesk feature for a couple of years which I find really useful and I am not sure everybody is aware of it. So I share it here. TeamDesk might even make its utilization easier.

It consists of displaying in the teamdesk forms the image of a pdf or an image.
I use this all the time when it comes to have a document review process (typically invoices where one person has to validate the numbers, another the ok for payment) or to visualize a document generated by TeamDesk.

To do this, I use an x-html formula carved by the TeamDesk boys (Slava, Kirill & co.):

<embed src="<% URLRoot() & "/attachment.aspx?fid=" &
If(not IsNull([FileAttachment]), ColumnId([FileAttachment]), ColumnId([FileAttachment])) & "&id=" & RecordId() %>" width="100%" height="800" type='application/pdf' ></embed>

So :
- I create a formula x-html field in the table
- The formula is adjusted to display another field, name 'FileAttachment' in my example above.
- I insert the field at any point in the form. For better result I create a section named Preview and name to ' ' (space) the tag of the x-html field on the form

TeamDesk might even want to create a function or something else more simple to use this.

Kind regards,

Pierre


ID
2083
Category
Integration/API
Author

Pierre
Date Created
10/25/2024 8:30:12 AM
Date Updated
10/28/2024 1:47:09 PM
Status
New Idea
Score
40
Promoted By
Ivan PapishPatricio BustosAnatoliy Zachynskiy
Pierre
Comments
Pierre 10/28/2024 10:41:16 AM
Ooops I forgot to mention
You need to give public access to the file attachment you are displaying
Slava Shinderov  Staff  10/28/2024 12:28:51 PM
@Pierre The formula you're using does not require the "Allow Public Access" option to be checked for the file attachment column.
Pierre 10/28/2024 1:38:29 PM
Slava is correct (again !) - Thank you Slava
Also the formula is not the correct one
The correct one is:

'<embed src="'&XHtml( URLRoot() & "/attachment.aspx?fid=" & ColumnId([FileAttachment]) & "&id=" & RecordId() )&'" width="100%" height="800" type=\'application/pdf\' />'
Pierre 10/28/2024 1:47:09 PM
Argh

<embed src="<% URLRoot() & "/attachment.aspx?fid=" & ColumnId([Document]) & "&id=" & RecordId() %>" width="100%" height="800" type='application/pdf' />
Feedback
 
Back to Search Results