Jump to content
  • 0

Open tabular datapage 'as download file' directly



I'm trying to work with a datapage's download file in a bit of a different way then normal. Instead of the user clicking the 'Download' link I need that download csv file to just 'open in the url.' (meaning the datapage tabular view doesn't open at all). 

This is because I need that download csv file to be available via a url for another, outside app to access (using that url) and then use to import that data. I need to cut out the steps where the user has to 'download the data,' take that file and then 'upload it to the outside app' to do the actual import. The outside app should be able to just go to a url and grab the data. 

I’ve looked into the Datahub but it won't work for this particular need because it’s an ‘all data all the time’ thing with 2 drawbacks. 1) it doesn't 'authenticate' the data at a sub-account level, other than the overall CB account and 2) all records need to not be exported at all times- only records the user designates or that are in a queue using various fields in the View for filters.

The existing ‘download’ link in a tabular datapage is close to solving both the authentication issue because 1) the datapage will only show data for the account that’s logged in and authenticated already, by design and 2) the ‘export status’ issue is dealt with using normal filters to filter out non-exportable or already exported records. These are the 2 big hurdles and using existing data pages solves them both. 

The missing part of this solution would merely be setting the datapage to ‘open the download file’ instead of opening the datapage view, on load. Since the datapage already has a download link the user can click on to get the data downloaded in xml/csv, it’s got to be just a matter of pointing the ‘on load’ of the datapage to just go to that existing ‘download’ link and instead of downloading anything just open it in the data page’s existing url.

Another related option might be for the datapage's 'onload' to activate the 'download csv' file and send it to a specific, designated url that's not the opening datapage (if that's easier). Then the outside app can go to that url and pull the download csv file.

Surely this can be done? It seems like it’d be very similar to the code for ‘select all’ and then ‘open bulk edit’ automatically that can be implemented on a tabular datapage. We just need ‘onload’ to be ‘open download xml/csv.'

Any help on this would be greatly appreciated- 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...