Using SQL to create records in FMP and get resulting ID

Discussion created by worldcloud on Mar 23, 2012
Latest reply on May 16, 2012 by technet_admin

I have used several SQL plug-ins, with similar results. My issue is understanding which SQL functions that FileMaker supports and/or the syntax. In mySQL, I have been able to write an statement to create a new record and return the value of my key field. I have created a beast of a workaround with FileMaker, but I use the MAX function which is too expensive on larger data sets. It takes almost 5 seconds to create a record In a 200,000 table. A new record script step is practically instant.


I would like to perform something like INSERT INTO PHONES WHERE ContactID = 5 WITH RESULT PhoneID



I totally 'made up' that last part, but knowing what syntax to get the 'PhoneID' field is my problem. PhoneID is an auto-entered serial number and no ESS is being used in this example. 100% FileMaker...