AnsweredAssumed Answered

Records Import script issue - seems to be pointing at the wrong table

Question asked by djs_1 on May 31, 2010
Latest reply on Jun 1, 2010 by djs_1


Records Import script issue - seems to be pointing at the wrong table


I'm using FileMaker Version: ProAdvanced 10.0v3, Mac OS 10.6.3, local version.


I have a script where I call:

    Import Records [No dialog; "$$ImportPath"; Add; Mac Roman]


I do this in over a dozen lines, and they all work, except for one. I found that it is pointing at the wrong table. The global variable $$ImportPath simply contains the full path to the fp7 file, and this works everywhere else. I have tried many things. I tried to do an import via "Matching Names" instead of "Last Import Order". It kept failing due to an "ERROR 729: Errors occurred during import. Records could not be imported." This was due to a validation error when it used the wrong table. I had turned off all validation and got around this error, looked at the data, and found that the one matching field from the other table was loaded with the number of records for the other wrong table.


I checked that I do go to the right layout before attempting the load. I am able to do a manual load of this table, if I have it display a dialog, it is pointing at the wrong table, I can change it to the right table and successfully load the table.I also created a new layout that is very basic that uses this table, and made sure I had no triggers on it. Again to no avail.


I did run a consistency check and found no problems. I also did a recover on a copy of the file, again no problems.I tried to use the recovered file for the import, same result.


I tried changing the order in which I do the import too.


I'm logged in as Admin so access is not a problem, besides, it does let me do this manually, and I checked off the checkbox on all applicable scripts to run with full access privileges for this particular operation.


I have 20 tables in my application. This table has 21 fields. This is important for my user base who depend on my import script to work. I've spent many hours trying to fix this.


Thank you for any help you can provide.