I understand from documentation that there is no Servoy script for exporting records but I can’t imagine it’s impossible since this is so core. I want to duplicate a functionality I have in FM like this:
A user selects and sorts a found set and then exports a text file and then uses send message to open up an Excel template that is set to auto-import that text file (through “get external data”). This way, users can, with 1 click, work with their data in Excel, without having to go through a manual export and manual import into Excel.
There are also a 100 other ways in which I’d like to script imports and exports, like users who need to import data from a partner company each day, etc.
Chris said "… like users who need to import data from a partner company each day, etc. "
For this particular feature you may want to look at a backend that supports synchronization, for example - Sybase SQLAnywhere. The SQLanywhere utility scales from palm type devices up to Oracle databases
I used the following code to try to export, but it didn’t write a file to c:\test.txt as expected - the file ended up in the servoy directory. Also, it didn’t present the user with a dialog to choose where to save the file as the manual (p323) says.
var fileNameSuggestion = ‘c:\test.txt’
var textData = ‘load of data…’
var success = application.writeTXTFile(fileNameSuggestion,textData);
//not going to c:\test.txt!!
//not presenting user w/ option to choose where to save as manual says p 323
I’m using Servoy R2 1.2 build 259. Is this version 2 or version 1.2?