Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

I am trying to run a script accros the web. I know this is not good practice but this is a import script only for one administrator to do every now and again so there is no risk of others running scripts at the same time.

My script works localy but not not in the browser.

If I set the first goto browse mode to pause and then click continue it works.

My script

Goto layout

Show all records

enter browse mode

import records

show all records

enter browse mode

My link

<a href="FMPro?-DB=database.fp5&-Lay=www&-Format=find_res.htm&-Max=25&-Error=error.htm&-Script=update&-FindAll">Update</a>

using FM U5 and also FM 5.5

TIA

Ric

Posted

As long as the link is not from default.htm it reads like it should work.

As to the script, I do not understand why you have enter browse mode twice. I don't even know that it is necessary once since everything done via the web would in all likelihood be done in browse mode.

Posted

Inastant or Custom?

I'll bet it's instant, which cannot run scripts any more sophisticated than "go to layout".

It can be done with custom, very easily.

  • Newbies
Posted

Thanks guys.

Anatoli what do you mean 'FM was not design for that purpose.' Pls expand.

It is custom publishing and the page is not default.htm.

I agree I don't need the enter browse mode but I was experimenting and when I pause the script on the first enter browse mode the restart the script locally it works?:

Any more ideas would be great.

Posted

Ric T,

Using a couple of old files which I converted and related for the purpose, I replicated what you are attempting with simple html/cdml and tested it. It ran fine.

The "secret" is that before you write your script, go to File/Import ... and perform the import activity designating which field or fields to import. Helpful hint. If you first will set up a relationship, you can then just import one unique id field and auto-lookup the rest. If you go this way, be sure to select "Perform auto-enter options while importing...", click OK.

Then write your script in database.fp5:

Show All Records

Import Records [Restore, No dialog, importfrom.fp5]

Show All Records

If you are going to use the script you have already written, revisit that script. Revisit the line Import Records... When you are selecting the database to import from (importfrom.fp5) if you are asked to Keep or Replace, select Replace. I put a button on the layout and ran the script. The import (using an auto-lookup) worked smoothly. I deleted all records and did it over the browser. Using your basic link approach it worked for me, and I displayed the 12 imported recordsd within an [fmp-record]...[/fmp-record] on the success page. You may or may not want to add a Go To Record [last].

Posted

RE: Anatoli what do you mean 'FM was not design for that purpose.'

It much depends on your real live scenario. If you will be single user doing such things to your data, then the idea will work. If that will be on web and you expects visitors, then one day will be more people in the same moment trying to take control over single application and it may just do havoc with your data.

This topic is 8549 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.