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.

How to prevent Missing Serial Numbers

Featured Replies

We have a sales order system. The Sales Order Numbers are Serial Numbers. Somehow there are times that the Sales Order Numbers will have gaps in them, ie Serial Numbers will disappear. I have a feeling that the records are not being saved or undone.

1) Anyone know how this might occur?

2) Any way to prevent this from happening?

Thanks in advance. I will follow up any additional questions.

Can you delete a sales order? If so, that would explain a gap. Perhaps, if all numbers must be accounted for, you could Void sales orders instead of deleting them.

Allowing a method to go back and fill in missing incrementing serial number can be very dangerous. You should rely on FileMaker's internal auto-enter serializing. If you try and go set it to Max (ID) + 1 if on the chance that 2 people run the script at the same time and the record hasnt been committed, you can get duplicate serial IDs.

If you must have some kind of incrementing consecutive number for the invoice, DO NOT use this as the primary key.

  • Author

Can you delete a sales order? If so, that would explain a gap. Perhaps, if all numbers must be accounted for, you could Void sales orders instead of deleting them.

No you can NOT delete any records/sales order numbers.

Thats part of the reason why this has be baffled.

Are you using FileMaker's Serial numbering system? or do you have one that you made up.

  • Author

Allowing a method to go back and fill in missing incrementing serial number can be very dangerous. You should rely on FileMaker's internal auto-enter serializing. If you try and go set it to Max (ID) + 1 if on the chance that 2 people run the script at the same time and the record hasnt been comitted, you can get duplicate serial IDs.

I've been careful when I put them back in. I have to do it due to audits and such.

If you must have some kind of incrementing consecutive number for the invoice, DO NOT use this as the primary key.

Invoicing has not been a problem since it is accomplished in a different (accounting) system. Only creating Sales Order Numbers.

You have a setting on the auto-entry options for a serial number, to generate the number "on creation" or "on commit". The default setting (and the only one I've ever used) is "on creation".

If this is the setting and a user Reverts a record before the record is committed, that serial number will "be lost".

I find users rarely intentionally revert a record without prompting, but often revert records because of a failed validation and the option is presented to them.

  • Author

Are you using FileMaker's Serial numbering system? or do you have one that you made up.

When we were in version 5, the original programmer (not me) set up a field "Sales Order Number" as an Auto-Enter Serial Number

Since I upgraded to FM version 8, "generate on Creation" is selected (I have not looked into "generate on commit").

As far as a solution...

As I said, I've never used the "on commit" auto enter, so I can't speak to of that. But I'd certainly look into why users are reverting records.

Doesn't entering the numbers in afterwards defeat the purpose of auditing?

  • Author

You have a setting on the auto-entry options for a serial number, to generate the number "on creation" or "on commit". The default setting (and the only one I've ever used) is "on creation".

If this is the setting and a user Reverts a record before the record is committed, that serial number will "be lost".

I find users rarely intentionally revert a record without prompting, but often revert records because of a failed validation and the option is presented to them.

I am aware of the Revert feature. Yes, you describe what is happening. However, I have watched people using who create the new Sales Orders. I have never seen them use the Revert feature. I will double check though.

Somewhere there is a way to revert, without using the revert command.

Somewhere there is a way to revert, without using the revert command.

Like a failed validation?

You've watched them create Sales orders and the numbers have skipped? How many numbers are we talking about?

Edited by Guest

  • Author

Like a failed validation?

YES! I do know they have fields that are required so they MIGHT do the revert feature here...

You've watched them create Sales orders and the numbers have skipped? How many numbers are we talking about?

I have watched them enter in Sales Orders and it works properly. I have never seen them enter in Sales Orders and then have the sales order number go missing.

But I will check this Failed Validation that leads to reverting...

I would check your scripts to see if any of them are setting this field to something.

  • Author

I would check your scripts to see if any of them are setting this field to something.

We have a script that creates a new record. In the new record we have a bunch of auto-entered data and a few required fields. I'm going to look into those.

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.