Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I have just started using Filemaker Pro and Scriptmaker. I am trying to import a simple file with just 2 fields that I map to fields in FileMaker. I know that eventually I need to do data manipulation on the imported fields, but that is not my problem right now. What I am trying to do is get the manual steps in a script so that I can embellish from there.

From searching on this forum I know that Filemaker's Import script step will memorize the steps for my most recent import. I set up a test script first, close Scriptmaker, then do the import manually (which works, by the way). Then I open my test script and immediately close it, but the dialog box does not allow me to select the option to 'Replace' the Import Order (it's greyed out).

I am taking over someone else's extensive work, so I'm thinking that some options or settings have been turned off or disabled.

What am I doing wrong? Where is the "Restore" option that needs to be turned on?

Any help would be appreciated...

Posted

Open the script in scriptmaker. Click on the step that performs the import. There is a checkbox at the bottom of the screen "Restore".

Check this box and close the script. It should ask if you want to use the current Import information.

  • Newbies
Posted

Thanks for responding. I do have "Restore Import Order" selected, but I'm still not seeing what I think I should be seeing.

These are the steps I'm performing:

1. Set up scriptfile called TestLoadFile

2. File -> Open

2a. Select ascii txt file (contains 2 fields)

2b. Save as fp5 file in the same directory as my fm application is in (say FileA Converted.fp5).

3. File -> Import Records...

3a. Select 'FileA Converted.fp5' and click on 'Open'

3b. In the 'Import Field Mapping' dialog box, I map 'f1' and 'f2' to fields in my database.

3c. Select 'Import Action' - Add new records

3d. Select 'Map Legend' - Import data

3e. Click on 'Import' button

4. In my application I can see the new records added.

5. Scriptmaker -> Edit TestLoadFile

5a. Click on line 'Import Records[Restore]

5b. Select 'Restore Import Order' and click on 'OK'

5c. Select 'Replace' Import Order

6. Go back into TestLoadFile and I still only see 'Import Records [Restore]

What I think I should be seeing is the name of the file I've loaded and the mapping. Am I thinking about this correctly or is this not possible?

Thanks - Carol

Posted

You do not actually see the information that is stored for the "restore". It's just there.

FileMaker has remembered the specifics of your import and has stored that information as part of the script step, so that whenever you activate that script again, you will not have to perform all the manual steps such as mapping the fields.

  • Newbies
Posted

Thanks Jason. I must be missing something. The reason I am doing this is to have an import script to start with so that I can manipulate the information in the fields that I map and do other file manipulations for each record.

What's the best way to do this, then?

Thanks - Carol

Posted

I guess the important question here is how do you know FM isn't remembering the import information? If you are waiting for the step in the script to display additional information such as file name, it won't ever do this. It will, however, remember the import order, file name and path and repeat the last import. If you have done a manual import, opened the script, closed the script and specified to replace the import order, it should repeat the import when the script is run.

My guess is something obvious is being missed. With the Import script step selected make sure "Restore import order" is checked, leave "Perform without dialog" unchecked until you get this working, and click "Specify file" and specify the filename (or not, if you want to select the file manually). After you perform a manual import, make sure you don't RUN the script before you edit the script to establish the import paramenters.

-bd

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