cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Create a service which initiates a download of a CSV file to your Local (Not To Server)

nikkolasep
10-Marble

Create a service which initiates a download of a CSV file to your Local (Not To Server)

Is it possible to create a service, which initiates download to my local directory?

So far I see only an option to write a service to download/write CSV file to server as below:

 

let params = {
path: "anyPath" /* STRING */,
data: anyInfotable /* INFOTABLE */,
fileRepository: "SystemRepository" /* THINGNAME */,
withHeader: true /* BOOLEAN */
};

Resources["CSVParserFunctions"].WriteCSVFile(params);
1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:nikkolasep)

When you run GetFileListingWithLinks on a repository, you'll get a link that can be used to download the file.

But you must make sure to execute the link client side (ie in a mashup)

I believe a 'link' widget should be able to do this for you.

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:nikkolasep)

When you run GetFileListingWithLinks on a repository, you'll get a link that can be used to download the file.

But you must make sure to execute the link client side (ie in a mashup)

I believe a 'link' widget should be able to do this for you.

where can I find the service GetFileListingwithLinks? I can't find it either in Snippets or in Me/Entities

nikkolasep_0-1649414319144.png

 

Hello,

 

You will find it on a repository thing:

// result: INFOTABLE dataShape: "FileSystemFileWithLinks"
let result = Things["SystemRepository"].GetFileListingWithLinks({
	path: undefined /* STRING */,
	nameMask: undefined /* STRING */
});

 

Top Tags