Jump 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.

import and auto-enter serial number update only?

Featured Replies

Is it possible to import records and update the auto-enter serial number by script?

I'm doing some development on a solution that is currently deployed. I am not doing the development 'live'. I want to work on the development copy, then import any changes to the data that have been made in the interim.

I've put together a script that runs in the 'live' file that finds all the recently modified or created records in each of the 12 tables in separate windows. Then I run a script in the 'development' file that imports from each of those tables.

I don't want to re lookup values (users may have modified those values and I don't want them to revert), or change the 'modified by' fields (confusing to users) or trigger any of the other auto-enty options...except I need the serial number to update, otherwise when the developed file goes 'live' I'll get duplicates.

Any ideas?

In each table, you need to:

1. sort asc by id

2. go to last record

3. set next serial value id, id +1

  • Author

Perfect. I didn't know that function existed. Thanks.

  • Author

For the record, what I did instead was:

Import Records...

Show All Records

Set Next Serial Value [keyfield; Max(keyfield) + 1]

For the record, this won't work. Max(Keyfield) will return the value of Keyfield in the current record - in this case the first imported record.

  • Author

For the record, comment is right.

I'd gotten tripped up interpreting one of the help file examples but hadn't got to test this out until tonight.

Thanks for the kind correction.

This is one of the most annoying FileMaker bug for me: the Set Next Serial Value offers a checkbox where to select the field, exactly as the Set field step does. But if you don't check it with Set Field, FileMaker interprets it as "current field". If you do the same with Set Next serial value, it just doesn't work.

With this corrected, an update script like you want to do would take less thant 10 lines and work in every situation, even with a new table.

:idunno: My method works every time. What didn't you like about it that you went in another direction? Oh well, I guess some people take advice and some have to make their own mistakes in order to learn. Yes, my feelings are hurt.

  • 2 weeks later...
  • Author

:bang: This is how I learn.

Create an account or sign in to comment

Important Information

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

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.