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.

Automate serial number by type

Featured Replies

I need to have my serial numbers update with a special designation at the beginning of a particular record. I have several categories of video tape that need to be put into a database. We would like the different types of tape to be designated with a certain code at the begining such as DV- for DV tapes and MINI- for MiniDV. I deally the client would like to be able to select the type of media either from a radio button or a pull down menu, at this point the serial numbering system would auto update the beginning designation to reflect the type of media selected.

I can think of two ways to do this. One is simpler and doesn't require any scripting, but the number portion of each ID is going to be unique. In other words, you'll have ids like DV1, MINI2, MINI3, DV4, etc. If this is satisfactory, then here's what you do.

Create a field called Number_ID and make it a text field with auto-enter serial number. Create another field called Tape_Type. This is the field that the user uses to select the tape type. Create a third field called Type_Type_ID and make it a calculation field with a text result with the calc:

Tape_Type & Number_ID

If you need ids like DV1, MINI1, MINI2, DV2, then you'll need to use a script.

For each possible type, create a global field called such things as Next_DV_ID, Next_MINI_ID, etc. To begin with, set all of these global fields to 1. If you have the options set up as a radio button, it will be easier to do the script. Each individual radio button will have a button over it that runs the script for that radio button option. Here's the script for the DV option:

Set Field [ Tape_Type, "DV" ]

Set Field [ Tape_Type_ID, Tape_Type & Next_DV_ID ]

Set Field [ Next_DV_ID, Next_DV_ID + 1 ]

You'll need a script like this for every option that can be chosen.

Chuck

Another possibility would be a self-relation on the tape_type field. After you have chosen the tape type, you can set the tape id with

SetField (Max(relation::id) + 1)

Then you can put the tape_type and the id together in a other field.

Have fun

Gerd

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.