IrongateMachine Posted November 19, 2003 Posted November 19, 2003 I'm trying to export a text file that is based on the record the user is viewing via the web interface. I will be using the text file to import the information into another program so the file has to formatted exactly right. I have calculation fields that put all the information I need into a comma seperated string. For each file, I need 3 of these strings on seperate lines. example: /SOHDR,USMOWER,O,31010,35205,35205,7/21/2003,7/21/2003, /SOLI,P,USM-250104,"Mount, Pivot Base, Mach",,,6,0.00,0.00,0.00,2,N /SOSUM,,,,0.00,0.00,0.00,0.00,0.00,0.00,US MOWER,ADDRESS Those 3 lines are each contained in seperate calulated fields, I need to export them to a text file and have each of them on their own line (as displayed above). Also, I only want to export the info for the record that is currently being viewed. This export action should be triggered by the user clicking the "export" button on the web page. Once the text file has been created, I need to run the auto-import utilty (an exe file) to import the info into the other program. After it imports, I'd like to delete the text file. I figure I can do all the execution/deletion with a batch file. I just need to know how to create the text file and trigger the batch file. Make sense? Any ideas on how I can accomplish this? Thanks,
Leb i Sol Posted November 19, 2003 Posted November 19, 2003 hello hello what "other programm" are u using? Formt issue:______________________ it depends on that program's ability to import and what types of file it can import..CSV..txt...dat...files. Web Issue:_____________________ I am not sure that CDML can handle "direct export" but perhaps (here comes the wrath...) an export script will do it...although most people suggest not use scripts over the web. But, if it is only a few users and the proces is not timed up to a sec of execution....it might be the way to go. ****Also, look into JavaScript and possibly using Hidden Form Fields or other form elements that will strip the "results/records" from surrounding HTML table and layer tags and than creating see http://developer.irt.org/script/994.htm parent: http://developer.irt.org/script/file.htm ...but I smell some need for ServerSide language Perhaps PHP & Lasso people here have better suggestions as those technologies have more robust file handeling than CDML/HTML+JS All the best!
Garry Claridge Posted November 19, 2003 Posted November 19, 2003 Will the exported file be located on the server? If it is Windows you could trigger a Script which calls a DDE to handle the exported file. All the best. Garry
IrongateMachine Posted November 20, 2003 Author Posted November 20, 2003 Thanks for the input so far...Here are some answers to your questions. The other program is called Business Works. It's an accounting program which integrates many aspects of a business together into a single program. It's runs from a Pervasive database backend and will only allow third party input by way of their special little utility. So I need to take all the information from a quote made in our third party program (Filemaker w/ CDML web interface), export it to the text file and trigger the special utility to auto-import it into Business Works to create a sales order. I know the import utility can use txt and csv files, as long as they're formatted correctly. The text in the file should look exactly like the lines I posted originally. This action of creating the text file/importing will not be done very often. Maybe a few times/day by no more than 3 users total. RE: Garry Everything will be located on the server which is running both Filemaker and Business Works. Everything is running on Windows. And what do you mean by DDE? I'll poke around at that link from Leb i Sol and see what I can come up with. I know Javascript and ASP, with a little crossover to PHP, so if that ends up being what I have to use, then hopefully I can get it working. Thanks again for all input so far!
Leb i Sol Posted November 20, 2003 Posted November 20, 2003 Hi Iron! I would suggest to use CSV and the formatting of fields is much much cleaner than a simple TXT file ( I don't think u can do line breaks with .txt output). CSV would also export headers should u need them.... "This action of creating the text file/importing will not be done very often. Maybe a few times/day by no more than 3 users total. " - In this case I would go for the script no doubt...which is what Garry suggested-- using a script "Send DDE Execute" ( I never tried it, so u'll have to chase Garry for more info) ASP might work with some XML as other option.If I rememeber ASPs FileObject Creation (of txt from filtered recordset) should handle this.... Good Luck! Post the solution, I am interested to know how it goes!
IrongateMachine Posted November 25, 2003 Author Posted November 25, 2003 Thanks for the input Leb. Here's what I'm doing: I use the SaveIT plugin to output the text file just as I want it. Then I use the Send Message script step to call the importing utility, which takes the text file and imports the data. I have SaveIT set to ovrwrite the text file, so I don't have to delete it. It's all done in a single script and it seems to be working for now...thanks for the help!
Keith M. Davie Posted November 25, 2003 Posted November 25, 2003 "It's all done in a single script and it seems to be working for now...." Have you tested this rigorously in a multi-user environment causing near-simultaneous hits on the script event? To avoid uh-oh's you should!
Recommended Posts
This topic is 7739 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now