Forum Discussion
Would you mind posting your solution? Might help others if they come across your question. You could then mark your response as the solution.
Absolutely Ember, not a problem. For the record though, Mark answered this and generally speaking, I'd trust his answer over mine. :) Below is the code for the button I got to work. This is basically a download only button, set to show in 'view' mode only, so our clients can easily download their documentation. It's downloading the document attached to the specific file attachment field id number. My button has some styling parameters in it as well, which can be changed or ignored. In this case, the field id number for the attachment field (where we attach the document internally) is 367. Additionally, it was important to me that the button NOT show up at all if there is nothing attached. We have several of these fields, but not every customer has every attachment that is relevant to them. This one is for a base contract, and the button simply says "Download Your Contract".
If(
[Contract - File Attachment] <> "",
"<a \n class='Vibrant' \n href='" & URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e367/v0' \n target='_blank' \n style='\n display: block;\n width: 100%;\n text-align: center;\n border: 1px solid black;\n border-radius: 24px;\n color: #000000;\n background: #a3ccc8;\n padding: 10px 16px;\n text-decoration: none;\n font-family: sans-serif;\n '>\n Download Your Contract\n </a>"
)