I think it supports transactions, if it does you should be able to do:
Open transaction
Insert new record into table
Select MAX(ID) from table
Close transaction
Robert
From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Monday, October 21, 2013 7:44 PM
To: TeraScript-Talk@terascrip
Thanks Beverly, that's the method I have always used previously. Guess it's
still the way to do it in my case.
Wayne
On 22/10/2013, at 6:24 AM, Beverly Voth wrote:
> FileMaker doesn't return IDENTITY like SQL/MySQL. I used to make sure I set a
> field with a value that I could find again just
FileMaker doesn't return IDENTITY like SQL/MySQL. I used to make sure I set a
field with a value that I could find again just after insert. SELECT the
record, get the recid, and probably clear that field with an UPDATE to the
record. It's been a few years, but this method should work whether you
@ACTIONRESULT is deprecated
Usually you need to execute a second query to get the ID.
I don’t know how to do that in FMP, but, for example, in SQL Server you execute
“SELECT @@IDENTITY” immediately after an INSERT and it returns the
auto-increment primary key of the record just inserted.