I have searched the forum and internet and not found an answer to my delima.
I have a solution with a scripted import of a csv file. I do not want import dialog (e.g. mapping), so I have it set to no. I don't know the name of the file, only that it is a csv file. If I leave the filename out of the import dialogue, the default SHOW filetype in the open file dialog is for a filemaker database. The user needs education to change the SHOW to csv or all. That is undesirable. If I import a correct file once, the next time the script runs in that session, it prompts for a csv file, but if I quit the application and run it again, it goes back to SHOWing filemaker databases. If I provide a bogus file, e.g. YourFile.csv -- I have to capture errors or I get no file dialog for them to find their file. If they cancel, they get a filemaker dialog I don't control that tells them the user aborted the import, continue or cancel. If they cancel, the script exits and I don't get control. That, too, is undesirable.
What is the best practice for scripted imports so that whether the user complies or cancels, I maintain control of what happens next?
By cat traveller
I am trying to run a server sided script that will import a found set. The server sided script opens a handler file that opens data file 1, does the find, imports into data file 2.
However, the search works in script debugger but imports all records.
The script opens layout A, searches goes to layout b, imports. Also the import of the selected fields seems not be remembered. I am stuck.....
By Joost Miltenburg
using FM18v3 I defined an import, update using key with option :add remaining.
Odd enough, when running the import for the first time, the key field remains empty. (Unexpected)
As a result the second time I run the script I get new records, but now the keyfieldfield is filled. (Expected) The third time the import also runs as expected ( no new records ).
I fixed this by defining this script in FM18 using an if. Eventually, I launched FM17 and re-did the script. Now it works like it should.
Anyone else can replicate this?
By JH Howland
Filemaker Pro 11 is running on two Windows 10 computers connected as Host and Client over a network.
The script to import data from an Excel .csv file utilizes the following script step options:
1. Un-Checked - Specify data source - File
2. Check - Specify import order, Import Action
a. Select - Update existing records in found set
b. Check - Don't import first record (contains field names)
3. Check - Perform without dialog
When the Import script is run from the Host computer, and the desired .csv file is manually selected, the Excel first row field names are not imported and the second row with the data is imported as expected. (See Host Import Mapping)
When the same script is run from the Client computer, the Excel first row field names are imported and not the second row data. To get the proper result, I have to leave the check box for "Perform without dialog" unchecked and then manually, from the "Import Action" group, check the box for "Don't import first record (contains field names)" to get the proper data imported. (See Client Import Mapping, check box is no longer checked)
Is this caused by a defect in FMP 11? I can't figure out why this is happening.