File Download Button | INTERMEDIATE
Quick Base buttons are great to manipulate your own data, but have you ever thought to use buttons to download a file attachment!?
Like me, you might had thought to yourself, why go through the process of creating a button when Quick Base makes it easy for me to just use the file attachment link?
Below are some benefits of why creating a file download button is better served than the default attachment field/link:
✓ It can be more visually appealing and orderly on forms and reports.
✓ When creating a notification, a download button can make it easy for the user to simply click rather than having to copy and paste a link.
✓ Have you ever wondered why some of your attachments download, others save, and yet others open in a new window? A download button can help solve this quandary.
Please remember – These are just some of the examples where a file download button is a better substitute for file attachment field. In the end, it comes down to personal preference and what the goals are for the end user that matters most.
Creating a Button to Download a File
EDITORS NOTE: In the steps that follow, we will be using a Rich-Text Formula field, not a URL field. You can use the default URL field to accomplish the same goal though. Also, the steps below will assume you are familiar with html tags and does not go into detail about HTML. For further information on HTML, click here.
- Select the table where you want to create the download file button (Preferably the same table where you have the file attachment field(s) located).
- Go to settings, and create a new field.
- Select the Rich-Text Formula field type and name it Download File.
- Open your Rich-Text Formula field
- In the first line below, we are creating the url link. The “31” is the field ID for the File Attachment field, yours will likely be different. The “v0” at the end refers to the latest version of the file attachment.
- In the second line below, we are creating the visuals of the button and referencing the url link in line one. You will want to make sure to include “$url” in your formula so that when the button is clicked on, it can reference your file attachment link and initiate the download.
- Lastly, insert your declaration at the end of your formula.
To see how to put custom HTML into a form element, see our article: Putting Custom HTML as a Form Element | INTERMEDIATE.
- Author: Alex Skudrovskis (email@example.com))
- Date Submitted: 5/8/2019