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.

User input to start a serial number field

Featured Replies

I am trying to make a few templates that I can cut and paste into new databases. What I have done is creat a NOTES table, where it has a few fields to personalize the global fields in the solution. Is there a way to have the user (or me) input into a field the starting number in an auto filled, serialized field without having to go into the properties of the difined field? For example, I would like to fill in a field in NOTES named Starting Serial Number, and have the field Computer.Info::ID NUMBER start serializing based on the value of NOTES::Starting Serial Number

Does that make any sense?

Thank you in advance for any help with this!

The only way I know of in v6 of FMP to update the serial number option without defining fields is to use the Replace Contents... menu command. Using this you can check the option to update the field's serial number option after inputting the serial number information of your choosing.

The same should hold true for v7.

If this option is not what you are looking for and there is no way in v7 of filemaker to update the next serial number option from a script command you do still have another option:

The best way to approach this is to create what I call a control table.

Example:

Create a table called "CONTROL" with a calculation field:

field name "cLINK"

field contents: "1"

Create the same a field in your NOTES table.

Next create a field in the CONTROL table:

field name: NextSerial

field type: (number)

Next create a relationship between the 2 tables so that you can get to the NextSerial field.

When you create a new record, make sure you use a script to do it so that you can use the following:

Script Example:

New Record/Request

SetField(ID NUMBER , RelationshipName::NextSerial)

SetField(RelationshipName::NextSerial , RelationshipName::NextSerial +1)

If you want to make your serial number fixed length (example: "00000001" or "A00000001") use field type: "text" instead so that leading zeros will not be automatically stripped off. In addition you will need to be a little more creative with how you update your next serial number.

In the following example, I want my serial format to have the letter "A" at the beginning and to always have 8 numeric digits for the number, for a total of 9 characters in length. To update the NextSerial field so that it increments by 1 and still retain the format that I want, I need to use the following example:

SetField(RelationshipName::NextSerial ,

"A" & right("00000000" & texttonumber(RelationshipName::NextSerial),8) +1

)

I think everything I have mentioned in this example exists in FMP v7.

Look at the Set Next Serial Number [] script step.

DOH! (Having a V-8 Moment) smile.gif

Always something that I manage to miss in FM from time to time hehe.

Thanks Vaughan!

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.