|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
I am trying to transfer data between textbases using a report containing fields from the primary and secondary textbases. So far the Command.writeReportToFile() will call up the dialogue box, but I need a script that will identify the report to be exported (and later picked up by the Importer), and will also complete the file path selection. Does that make sense?
|
|||
|
It makes sense.
However, there is no parameterized Command.writeReportToFile() script function. Parameterized commands permit you to specify the information that would appear on the dialog, and end with "Ex". There's no Command.writeReportToFileEx() command. I'll add your name to this feature request. DB/Text for Libraries moves certain information between textbases using Recordset scripts. |
||||
|
quote: Thanks for that Lisa. How about this as Plan B? If I use the following script, am I able to include fields from a secondary textbase? function export_onClick() { var ned=Command.newExportDescriptor(); if (ned) { ned.exportFileName="c:\\export" + Form.boxes("EntryNo").content+ ".dmp"; ned.exportFieldNames(0) = "Entry_Number" ; ned.exportFieldNames(1) = "Entry_Item_Number" ; ned.exportFieldNames(2) = "Name" ; ned.exportFieldNames(3) = "Condition_Grade" ; ned.exportFieldNames(4) = "Hazards" ; Command.exportDataEx(ned); Application.message("Exported "+ned.RecordCount+" records to file " + ned.exportFileName + ".\nDidn't export "+ned.RejectedCount+" records."); } else Application.message ("Failed to get an export descriptor."); } |
||||
|
No, you cannot export secondary fields.
The only ways I can think of to do what you want with the current version are to: a) Use a Recordset script to AddNew() or Update() records. b) Use the XML output feature of WebPublisher 6.0 to transfer data. (I'm rather vague as to the details of how to do this, but Inmagic Consulting should be able to help you for a fee.) Secondary fields are available in WebPublisher XML output if the form you specify (RF=) includes those secondary fields. Note that the current version of the PowerPack Importer does not import XML, but the next one will. I don't have a release date for the next version. c) Use the DB/Text ODBC Driver (and your own front-end code) to read information from the two source textbases (primary & secondary) and write it to the target textbase. d) Use something like the Windows Scripting Host to write information to a file; but you'd have to handle all the formatting and actually writing to the file yourself. I personally haven't a clue how to do that. |
||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

