Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Current ID or record id

Featured Replies

  • Newbies

I have a just quick question.

Is there a easy way to get the last record id entered.

I know the way to go it in mysql but not with filemaker and FX.php.

any help appreciated

The data returned from the "-new" action can contain the "CurrentRecID". I use PHP but don't use FX however somebody who is familar with FX may be able to show a particular method.

Good Luck.

Garry

Do you mean the RecID of the last record you "just created" or the last record in the file ? I am asking because if you are in a multi-users scenario, these could be quite different.

If it's the record "just created", you can obtain the recID from the results of the FMNew call as such:

FMNew ($returnDataSet = true, $returnData = 'full')

Creates a new record in FileMaker pro with fields populated with the values specified by instances

of the AddDBParam() function. By default, data is returned -- the record just created.

// Not a complete query, FX() and SetDBData() are missing...

$InstanceName->AddDBParam('FirstName', $firstName);

$InstanceName->AddDBParam('LastName', $lastName);

$InstanceName->AddDBParam('Office', 'Austin, TX');

// ... that being done, you should be able to retrieve the RecID of

// the record JUST CREATED.

$ReturnedData = $InstanceName->FMNew(); // stores the new record in $ReturnedData

$recKey = key($ReturnedData['data']);

$recordPointers = explode (".",$recKey); // where $key is the current key from $ReturnedData['data']

$recID = $recordPointers[0]; // here's the RecordID

$modID = $recordPointers[1]; // and here's the ModifyID

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.