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.

Clone and reset counter key to zero

Featured Replies

This may have been covered many times, but the search engine on this board doesn't seem to find it.

I am new to FMP from an Access background. I have a database structure and input form I like to use, so I set it up in FMP and got it working. Then I cloned the db but didn't get the result I was expecting. Traditionally (using Access) each time I would start a new project I start with a spankin' new copy of my formatted database. Is it possible to clone the FMP database and have the key field reset to zero?

If you save your database as a clone, with or without records, the enternal structure remains the same. Hense, the reason they call it a clone. Removing the relationships are not that hard, all you have to do is to trash them in the Relationship Graph.

HTH

Lee

  • Author

Thanks, Lee; maybe I wasn't clear (and wouldn't that be a first!). But your reply did jog my memory. Here's how I fixed it (for the next schlump looking for how to do this)...

1. Clone with no records

2. Open the clone

3. Select File> Define> Database (or Ctrl+Shift+D)

4. Bring up the Fields tab

5. Select the key field you want to reset

6. Click the Options button

7. Reset the "next value" to 1

8. Ok

9. Ok

:)

If you do this often, you could automate this somewhat by having an opening script to reset the serial if there are no records in the table. I think having Filemaker do this automatically would require too many assumptions: note that your topic says 'reset to zero', but your script resets to 1.

  • Author

The first assumption would be that I could correctly present my thoughts in a cogent statement. I guess I do want to reset the first record to have a key value of 1, not zero. I am assuming that my 'next record' would be my first record if I follow my routine. A script running automatically would really be good. Now I have to learn about scripts. Next project!

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.