Jump to content

This topic is 7892 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

In Filemaker you can perform an export of your records as a tab-delimited file.

Is there a way to create a button in an HTML document that take the search results one queries form a database and export in the same maner?

In trying to build my custom solution(s) I'm thinking of ways to import and export data via the web rather then buying addtional licences of filemaker.

Here is one idea I have. We have a product database in Filemaker that gets its info from imported Excel documents (prices, SKU numbers, etc). Once in Filemaker, we add information like product description, wether it has artwrok available, etc. I would like to get this database online for our catalog production staff.

Here is the senerio, user logs in and does a search for x,y, and z products and recieves a search result. To make it easy for them to start building the print catalog, this search result can be exported back out as a tab-delimited file via the web. Tab-delimited files can be easily imported in Adobe Indesign.

I would also like the reverse to be true for the CDML coding. When the Excel spreadsheet gets updated, the authorized user can click a button on the page and upload the exported file and the database gets updated. Is this possible?

Here is another solution I'm thinking of building. The work group I'm in has a project database built in filemaker. Currently we have a project request form for other departments to fill out. This is built in Adobe Indesign. Now I can convert that into a PDF and make it an Acrobat form.

What I would like to do is have the Project database online in CDML/HTML and the PDF form posted for download and online viewing. The end user fills out the PDF and sends back the .fdf file to the server. Data fills from the .fdf document creates a new record in the database and it is able to be posted. Is this possible?

Posted

Is there a way to create a button in an HTML document that take the search results one queries form a database and export in the same manner?

Yes - Access the Database directly via FileMaker and export a file (containing any results) in the format you want. Then, access ScriptMaker and create a Script (I would call it "WEB_ExportFile"). In the script add an action of "Export Records", ensure that you select "Do Not Prompt" and "Restore" (this will ensure that the same settings you have just used are used for any export performed via this script). Also, ensure that you set the destination of the export to a folder where it will be accessible (ie within the Web Root if access is via webpage, or into a sharefolder if it is to be accessed in that manner). And make sure that the name is easily recognised.

Then, finally, in your CDML create a link with a href of:

"[FMP-Link: r]&-format=Export_Success.htm&-error=Export_Failure.htm&-script=WEB_ExportFile"

When accessed via a web-browser, clicking on this link will redo the last search, then export the file as you set in ScriptMaker. The Format & Error pages will provide feedback on the result, and should also give you the opportunity (if accessing the file via a webpage) to provide a link to the file and instructions on how to download it.

I would also like the reverse to be true for the CDML coding. When the Excel spreadsheet gets updated, the authorized user can click a button on the page and upload the exported file and the database gets updated. Is this possible?

Yes

But, Filemaker (to my knowledge) does not have the capacity to perform file uploads by itself, however, if you could find another method to upload the files to a public folder on your server, you could again use a FileMaker Script to process these records and import the data into the file.

Here is another solution I'm thinking of building. The work group I'm in has a project database built in filemaker. Currently we have a project request form for other departments to fill out. This is built in Adobe Indesign. Now I can convert that into a PDF and make it an Acrobat form.

What I would like to do is have the Project database online in CDML/HTML and the PDF form posted for download and online viewing. The end user fills out the PDF and sends back the .fdf file to the server. Data fills from the .fdf document creates a new record in the database and it is able to be posted. Is this possible?

I have no experience with PDF/FDF files, so I am not 100% sure if it is possible, but, it doesn't sound impossible.

Luke

Posted

"Then, access ScriptMaker and create a Script..."

Ha, ha, ha, ha, ha. This advice always breaks me up.

And after you have done all of this, be sure to test it vigorously by submitting multiple (say ten or fifteen) near-simultaneous requests on the ScriptMaker script. ScriptMaker is single-threaded and does not queue requests. CDML does not recognize when an event failure occurs in ScriptMaker.

If you will spend the time to search the Internet forums, you will find ScriptMaker on the web has been widely discussed. You have been cautioned.

Now you have two widely different opinions on ScriptMaker. Only one of them is correct. Good luck.

Posted

Hi, we're using something like this for online magazine subscription.

The database captures loads of info about the subscriber and the mag title.

The administrator goes to the admin page and can see all the outstanding requests for each mag and can click a 'get file' button for each magazine.

that runs a simple script

find title and "exported no"

export the records to a particular directory

set the exported flag to "yes"

They then load the data into Excel for reader profiling

Now, I've always been against scripts on the web, but this works for me, perhaps because the script is only run a couple of times a day by one or two people. In these circumstances, you could import records the same way or incorporate SMTP-IT to email the export file.

regards, Jeff

  • 2 weeks later...
Posted

Is your script in Filemaker or is it a Javascript in the page, Jeff?

I am sort of in the same situation with my DBs. Tab delimited extraction I might even want to make on a per user authorization setting. Only selected loged-in users could do this functionality

Thanks for all your imputs.

Posted

Hi, the script runs in FileMaker (though I hate to admit it here). I just call the script through a url:

http://mydomain.com/directory/FMPro?-db=thedatabase&-lay=web&-format=search_results2.htm&exported=no&-Script=ma&-Find

In my case I run a different script to export each magazine, but I guess you could make each export file unique to a user by embedding fields, tokens or cookies into the search url, like:

&-Script=ma&-Find]http://mydomain.com/directory/FMPro?-db=thedatabase&-lay=web&-format=search_results2.htm&username=[FMP-CURRENTTOKEN:HTML]&-Script=ma&-Find

The script command only gets executed after the find, so you would get the found set exported.

Same warning, though. This works OK for me on this database, but i wouldn't use it if the script or db was very heavily used.

regards, jeff

  • 2 months later...
Posted

My suggestion may not be the best for ALL applications, but in the instances I have used it, it has operated properly and has never caused me any grief.

Just because _you_ might not do it that way doesn't make it the wrong way.

Posted

In any case it is the wrong way for web application, but if your traffic is low, it can work. The thing you may observe is, that during script operation the FM is not responsive to another web requests. It can even crash or froze.

Posted

"...but if your traffic is low, it can work."

Even with low traffic near-simultaneous requests on ScriptMaker events can occur. Since CDML in and of itself cannot recognize a ScriptMaker event failure (single-threaded engine running one event receives a 2nd request which it neither queues nor processes), what solution do you recommend?

The way is to ensure that the scripts get run is to allow only one authorized person run all web scripts.

Posted

I am not disputing that smile.gif

What I will say is simple. Single step scripts can run and will not crash in 99%. Like "set field".

The more one throw on FM, the greater chance exist it will collapse.

Posted

On a public site, one dissatisfied user will tell how many others? How many of them will not use the site? How many of them will tell others of problems at the site? Snowballs can grow quite large.

On a closed site the question becomes how much data is the owner willing to lose?

For both public and closed sites, data handling without data loss (or data exposure to unauthorized scrutiny) must be of prime concern, otherwise there is no need to use any db on the backend.

Anatoli, you wrote, "Single step scripts can run and will not crash in 99%."

And yet the 1% could mean ten (data loss) errors per 1000 transactions. It is clear to me that even one error per 10,000 transactions is unacceptable. Which means that ScriptMaker on the www (like your answer) is unacceptable.

Anatoli, you have championed the non-use of ScriptMaker because of the problems and there are other ways to handle the data in FileMaker. You are a major contributor to these forums and you claim vast solution design experience. Your "What I will say is simple." is also allowing a big hole for data loss as I have shown, I must ask you again, "Since CDML in and of itself cannot recognize a ScriptMaker event failure (single-threaded event engine running one event receives a 2nd request which it neither queues nor processes), what solution do you recommend to ensure there is no data loss?"

Posted

You are right of course, but I have only single sin in all my solutions, only one single step script in one of the 35 files.

Obviously it is not handling any data. It is just converting the WC data format to European in search routine to flag displayed record as "Today".

Even if that script will fail in 50% of visits, nothing will ever happen. Today description will be missing on HTML/CDML page.

Obviously, when I will convert that to Lasso, LassoScript will handle that my "sin".

smile.gif

Posted

So Mr. Anderson can convert to Lasso. But what about CDML. But wouldn't Keith Davie's ScriptMaker workaround in CDML be sufficient to protect a simple record export script from the web?

Posted

"Ask Keith if he can backup with his money his claim"

Maybe Keith will respond.

But I'm not sure what you mean.

"...when I will convert that to Lasso, LassoScript will handle that..." Does Lasso back with its money LassoScript? How does that work?

Posted

Let me point out that FMI leads one to believe that ScriptMaker will work for browser solutions in CWP, as evidenced by the many postings about ScriptMaker including the recent response by jonesy17. jonesy17 is probably doing what he recommended. But, he has misidentified the "drawback". Like so many developers, he has failed to do vigorous testing of his solution as in a multi-user environment and so is unaware if the scripts ever fail and what occurs if they do.

As you well know Anatoli, running ScriptMaker through a browser successfully is not that simple, which is why all the cautions about avoiding ScriptMaker, especially since cdml flat-out fails to deal with event failure recognition.

You have examined my solution. Remember back on April 9, 2001 you wrote of my solution:

"The "workaround" relies on SCRIPT (!) to check if somebody is running Script."

"In another words, the problem with single threaded FM is just elevated up to another level."

"FileMaker will still crash or stall if 2 people will try to run scripts."

You were SO wrong. The basis for the browser solution arose from the known success of that "script to check if somebody is running script" technique in peer-to-peer solutions. It's just done in a different, more complex manner for use with browser solutions.

I know how to make ScriptMaker work safely and successfully on the www (including what scripts to avoid). I demonstrated that at my site. ScriptMaker is just a tool in the FileMaker toolbox.

Anatoli, when all is said and done I was able to accomplish that which eluded you with ScriptMaker and browser solutions. (Maybe that's why FMI would not give you a money back on ScriptMaker.)

"Ask Keith if he can backup with his money his claim." Oh how silly. I am under no obligation to give away my intellectual property or sell it. There is no need for me to backup my claim in any way.

Any competent developer can design a solution to the successful and safe use of ScriptMaker on browsers. The ability (or lack thereof) in others to develop successful solutions in FileMaker has absolutely nothing to do with my accomplishments.

Quit blaming the tool. ScriptMaker is doable in browser solutions. I have done it.

I have no interest in the intransigence of the lazy and incompetent in this matter.

Struggle. LOL laugh.gif

This topic is 7892 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.