appendTempFile

To add content to a temporary file on the Ninox server

This function adds the given content to a temporary file, which will be accessed via a given link created by createTempFile().

The respective file must have been created already and still exist when executed.

Use this function in combination with createTempFile() to render large or long-running exports.

The function can be executed only on the client. Learn more about execution context

Syntax

appendTempFile(link, string)

appendTempFile(string, string)

Return

void

Examples

appendTempFile(myURL, myContent) To add content to a temporary file on the Ninox server.

let linebreak := "
";
let header := "CustomerID,Revenue" + linebreak;
URL := do as server
		createTempFile(header, "export.csv")
	end;
do as server
	for customer in select Customers do
		let line := customer.Id + "," + customer.Revenue + linebreak;
		appendTempFile(URL, line)
	end
end

Result: First, a temporary CSV file is created on the server and the link to the file is saved in the URL field. Then data from the Customers table will be added line by line to the file.

See also

createTempFile, which creates a temporary file on the Ninox server.

Last updated