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.

Multiuser - record or file locking?

Featured Replies

In our invoicing system, I stored a running invoice number in a field in a table. When user has completed entering the invoice, my script will go to this table and get this running number, and then increment this number by 1 before exit. In multiuser, we often encounter two invoices having the same invoice number. It looks to me two users happened to go to the same field and retrieve the same running number. I tried using Open Record to 'lock' the field but it does not work. This is giving us a big headache. Appreciate any help how to overcome this.

In general, I don't like this serial numbering technique because of the record locking issues, but I assume you have a good reason. If you post the script you're using to retrieve and increment the serial, maybe there's a way to work around it by doing more error trapping.

  • Author

The code is very simple. I simple go to the layout, find that record and read the serial number field. I then increment that field before returning to the main program.

I agreed with you this method is not ideal but I cannot think of other way.

I am more than happy to change my coding, Appreciate you can share with me a better of way of handling this situation. Thank you

What is "this situation"? What prevents you from having an auto-entered serial number in the Invoices table itself?

  • Author

Let me explain our situation. Our invoicing table is actually a general purpose 'billing' table. It is being used for Quotation, PreOrder and Invoicing. We have a field called TypeOfTransaction to differentiate between them. Each has its own running number. If user is doing quotation, then the so called "invoice number" field will store the Quotation running number and so on. As such we cannot make use of the auto-entered serial number. We stored all the running number in a separate table as I have described earlier. But we run into duplicate number especially for Invoicing.

OK, that makes sense. See if this helps.

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.