HOW TO script an export??

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

HOW TO script an export??

Postby chris » Wed Dec 31, 2003 9:11 pm

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.

Would love to know how. Thank you.
chris
 
Posts: 82
Joined: Wed Dec 31, 2003 8:24 pm

Postby Jan Blok » Fri Jan 02, 2004 5:38 pm

It will be in the Servoy 2.0final as plugin methods
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

import data from a partner company

Postby Tony_Adrian » Fri Jan 02, 2004 5:53 pm

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
Tony Adrian RN

Nursing Data Inc.
A Medicare Approved Software Billing Vendor
Database/Document Management for the Health Care Industry
Servoy, Sybase, Lotus Domino/Notes
Tel: (337) 394-8548
Fax: (337) 394-8504
sales@NursingData.com
Tony_Adrian
 
Posts: 42
Joined: Thu Apr 24, 2003 3:24 am

Postby Guest » Sat Jan 03, 2004 12:02 am

thanks for the reply - 2 comments:

1) 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

2) I'm using Servoy R2 1.2 build 259. Is this version 2 or version 1.2?
Guest
 

Postby jcompagner » Sun Jan 04, 2004 5:23 pm

1> please try c:/test.txt

2> you are using 1.2 not a beta of 2.0
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to How To

Who is online

Users browsing this forum: No registered users and 2 guests