How do I create a template.csv file on the fly for the user to download via their browser.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2023 01:30 PM
I am working to update an existing Scoped App that is accessed via a desktop browser (Chrome, Firefox, Edge).
Currently, there is a clickable link for the user to download a Template.CSV file for the user to fill out and then upload.
The problem is that the pointer to the file changes between environments (dev, qa, prod), and has to be manually edited when the code is promoted between environments.
The template is quite simple, and I am looking for a way to let the user click on the link / button / whatever and have the .csv file created and downloaded via their browser (instead of retrieving a file and giving it to the browser for download).
The template.csv file consists of two (2) fields for the column header (and nothing else):
Server Name,IP Address
That is the only row in the file.
How can I create a file on the fly and push it to the browser for download?
It currently imports the .csv file successfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:18 AM
Hello! Was this something you were able to figure out? I'm looking to do something similar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:35 AM
You mention "code" that is promoted. If so, add logic to query the 'sys_properties' table for the 'instance_name' and use the value to distinguish the instance the template is for.