Display file name along with download link in Jitterbit App Builder
When a file is uploaded to App Builder for the purpose of being available as a download, App Builder displays the file size along with a download link by default. In this article we will provide an overview on how to change the file size information being displayed to the file name value instead. This example assumes you have an underlying Table with a Column that is a File Logical type to store the file data.
Example App Builder default behavior to display file size along with download link
How to change the file size display to file name
-
Navigate to an app page containing a file download link and identify the Link Address information:
- Open Developer Inspector Tools in web browser
- Click the Network tab, then click Clear
- In {{nm.ab}}, click the download icon so that you see the Save prompt
-
Return to Network tab and there should be a single entry for the file download
Illustrating Copy using Inspector
-
Right click on the entry and select Copy > Copy URL
- Paste into text editor program, like Notepad
-
Modify the value so that it begins with
'service/...
. It will look something like:'service/file/control/de6fe101-d63b-427d-81d7-5bfcaf6eb407/table/fa2d1a46-6ca0-4064-9765-69bbfd1c8027/field/d14ee8e6-3242-42b6-9692-1f28416fe382/download?EmployeeID=' || cast(EmployeeID as nvarchar(50)) || '&%24timeZoneOffset=-240&%24timeZone=America%2FNew_York&%24pageId=2f8f4a8a-9da9-4300-bf37-86b1b9d25d68&%24windowId=9ebd097d-4c2a-4b63-8170-99ddf4a8bbd0'
-
Navigate to the Business Logic view of the Business Object driving the panel
-
Add a new dynamic substitution Column record to the Business Rule where you will sub in your Primary Key into the URL
- Enter the value obtained in Step 1 into the Column or Expression field
- Name it downloadlink
-
Create a new Text Control Type
- Name it Download Link
- Set the Column to downloadlink
- Set the Edit State to Hidden
-
Create a new Text Control Type
- Name it FileName
- Set the column to Filename
- From the control Edge Case tab, set the Link Target to {{downloadlink}}
-
Navigate back to the application page view, refresh the web browser, and confirm you now see the File Name appear vs. the File Size. Clicking the file name will download the file.
Finished example with File Name displaying instead of the File Size for file download
Note
You can set the File Control to be Hidden if you don't want it to display on the page. However, if you remove or deactivate the File Control, then the download will no longer work.